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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Fill Transparency of Area Under Curve
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Mulvenna

Germany
46 Posts

Posted - 09/26/2013 :  04:32:37 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

greg

USA
1378 Posts

Posted - 09/30/2013 :  11:00:19 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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);
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000