The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Fill Transparency of Area Under Curve

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Mulvenna Posted - 09/26/2013 : 04:32:37 AM
Origin Ver: Origin Pro 6.0
Operating System: Windows 7

Hi,

I was hoping someone could tell me if fill colour transparency can be controlled using labtalk?

I have a script that adds error bars to plots, for some of the error plots though, the bars can be quite messy, so I am using the connect option instead. It would be great to be able to fill the area between the error and the plot but this then blanks out the plotted data. I cannot find a way to access the fill area transparency using labtalk or set the fill colour to none. If I could set the colour to none, I could use a pattern fill instead.

Any help at all would be great.

Thanks
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 09/30/2013 : 11:00:19 AM
I assume you mean Origin Pro 9 ( or at least 8.51 or later ) since Origin 6 did not have Error Bar or transparency.

You currently cannot control this through LabTalk, but Origin C can do this:

void SetFillTransparency(uint uPlot, double dValue)
{
GraphLayer gl = Project.ActiveLayer();
if(gl.IsValid())
{
DataPlot dp = gl.DataPlots(uPlot);
if(dp.IsValid())
{
Tree tr;
tr = dp.GetFormat(FPB_ALL, FOB_ALL, true, true);
tr.Root.Pattern.Transparency.dVal = dValue;
if(0 == dp.UpdateThemeIDs(tr.Root) )
dp.ApplyFormat(tr, true, true);
}
}
}

Since this is Origin C, plot indexes are from 0 and the uPlot must refer to the Error Bar dataset. So if the Error Bars in question are the fourth dataset plotted in the active layer and have Connect set and fill area turned on, then this will set the transparency level to 50:

SetFillTransparency(3,50);

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000