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
 Access to 3D plot properties

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
DataConv Posted - 08/18/2010 : 10:56:43 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.1G SR3
Operating System: XP Pro SP3

I do have a graph containing one layer containing a 3D-coloured-point plot with 3 datasets. I have (manually) set the same colourmap for all 3 datasets. However, every time i use different measurement files, the scaling of the colourmap (not the x,y,z coordinates) changes. I do have the absolute minimum and maximium value for all 3 datasets calculated in a worksheet. Now i want to use these values to set the upper and lower boundary for the colourmap and apply them on all 3 datasets per scripting. I used the
layer.cmap.zmax
layer.cmap.zmin
properties to change the scaling. However, after applying
layer.cmap.updateScale();
also the Z coordinate is altered - which should not do! Additionally, only the first dataset is changed, the other are untouched. Currently i apply a
win -a
command to activate the graphic. I would prefer a solution using a range variable, since i do not need to activate the graphic with this alternative...
4   L A T E S T    R E P L I E S    (Newest First)
DataConv Posted - 08/27/2010 : 08:59:52 AM
At the end, i managed to handle the problem.

After setting the layer.cmax.zmin and/or layer.cmax.zmax value it seems to be mandatory also to set afterwards either the layer.cmap.numMajorLevels or layer.cmap.inc property. I haven't tried the layer.cmap.numColors or layer.cmap.numMinorLevels property, but to me it seem reasonable to have the same effect. Maybe this should be stressed in the help file to prevent confusion...

So my script part looks like this (3DLin is the name of the graph, s1 and s2 the min/max values):
{
win -a 3DLin;
layer.cmap.zmin = 0.2* int( s1 /0.2);
layer.cmap.zmax = 0.2*(int( s2 /0.2)+1);
layer.cmap.inc = 0.5;
}
Not perfect, but works...

DataConv Posted - 08/27/2010 : 06:25:08 AM
quote:
And for the command layer.cmap.updateScale(), our document has not been written correctly. It is actually to be used to set the scale of the Z axis according to the maximum level and minimum level of the colormap. And please note that if you have modified the maximum level or minimum level using layer.cmap.zmax/zmin, the color map of a plot will be updated automatically.

In fact, setting the zmax and zmin values works. However, in my case the update does not work automatically. I have set the scaling to a fixed number of mayor divisions and subdivisions. What happens is following:
Starting with a proper scaling:

After changing the dataset, on activating the (graph) windows following script is applied:

And this is the result:

Now a manual change of the color scale/map is needed...
For the effect shown, it does not matter where the script is located or the conditions to be executed.
Bug or feature?
DataConv Posted - 08/19/2010 : 06:17:30 AM
Thanks VincentLiu. I was confused about the terminus 'layer' because in the help files i read somewhere (unfortunately I can't remember where exactly) that each plot is handled as a layer in the graph. So my assumption was that by addressing each layer i could change the zmax/zmin value for each plot. However, [Graph1]2! does not work, so only the first plot can be changed...
So my workaround is to collect all X/Y/Z/color data in one sheet and plot just 1 dataset. Nasty - since it can consume a lot of additional memory...
BTW: A nice tool for scripting would be an object properties browser...
VincentLiu Posted - 08/19/2010 : 04:57:06 AM
When using the command layer.cmap.zmin/zmax, it is by design that Origin always performs the settings on the first plot (not the active plot) in a layer. But in Origin 8.5, which will be released soon, you could perform settings on arbitrary plot that has been activated.

And for the command layer.cmap.updateScale(), our document has not been written correctly. It is actually to be used to set the scale of the Z axis according to the maximum level and minimum level of the colormap. And please note that if you have modified the maximum level or minimum level using layer.cmap.zmax/zmin, the color map of a plot will be updated automatically.

To perform settings without activate a window, you could use the following method with range variable to do it.

range aa = [Graph1]1!; // Refer to the Layer1 of the Graph1
aa.cmap.zmin=-30;
aa.cmap.zmax=5;



Vincent
OriginLab Technical Services

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