Author |
Topic |
|
Mulvenna
Germany
46 Posts |
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 |
|
greg
USA
1378 Posts |
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);
|
|
|
|
Topic |
|
|
|