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
 Origin Forum
 Plotting and reformatting contour plots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jdf726

78 Posts

Posted - 05/26/2017 :  07:16:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 2016 64 bit b9.3.226
Operating System: Win 7

The 'building block' of our data documentation system is typically two side by side contour plots of 2D data. The left and right plots are sometimes different represntations of the same data (e.g. one could be a derivative plot) or it could be a different measurement channels.

We have am originc script to import the data which uses some code to create an information label with the ~20 data parameters and add matrices to left and right plots. THe axis limits are also set in originc upon import.

Sometimes I want to tweak these plots afterwards and I end up doing it by hand which is time consuming (re-setting axis limits on two maps on 10 plots by hand many times a day).

Is there a labtalk snippet that can set the z-axis range on one of the plots? (I tried applying a colour map theme, but it set the range on both plots to be the same!)

Can I swap the matrix plotted for a different one using labtalk?
(the matrix have the same name beginning, but deviate at the end for different channels, e.g. M83FB_c1 versus M83FB_c2)

How do I plot two matrices with a template in labtalk? (assuming I already have two matrices imported).
I tried to understand 'plotms' but what happens when there are two datasets/axes?

jdf

cpyang

USA
1406 Posts

Posted - 05/28/2017 :  1:33:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Color map on a contour plot can be controlled by the layer.cmap object, see

http://www.originlab.com/doc/LabTalk/ref/Layer-CMap-obj

For example:

layer.cmap.zmin=0;
layer.cmap.zmax=4;
layer.cmap.SetLevels();
layer.cmap.updateScale();



CP
Go to Top of Page

jdf726

78 Posts

Posted - 05/30/2017 :  07:00:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Excellent! I did do a google search for a while to try and find out which command to use (if you don't know that you are aiming to call the 'cmap' command, what should I have searched for?...)

Do you know how to change which matrix is plotted on a particular axis? (I know the structure of the matrix names - remove 'F36A_c1' and put 'F36A_c2' instead).

In the GUI you could do this two ways - one by using 'plot setup' and using 'remove' then 'add' buttons to add the matrix you want OR you could use the 'layer contents' dialog and use the little left arrows to remove the unwanted matrix and select then right arrow to add the one you you want.

Cheers! jdf

Edited by - jdf726 on 05/30/2017 07:42:51 AM
Go to Top of Page

jdf726

78 Posts

Posted - 05/30/2017 :  08:06:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ah... and a related question...If I wanted to set the colour scale on the left hand and right hand layers separately (without clicking on the plots) how do I determine the 'active layer' to which the settings are applied?

(I generally want to set the plot on the left to different z-axis/cmap scaling to the one on the right).


jdf

Edited by - jdf726 on 05/30/2017 08:17:18 AM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 05/30/2017 :  09:20:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
To add a dataset to a layer, use layer -i and to remove, use layer -e, see

http://www.originlab.com/doc/LabTalk/ref/Layer-cmd#-i.3B_delete_all_data_plot_style_holders_in_the_active_graph_window_layer

To operate script to a particular layer, use layer -o, see

http://www.originlab.com/doc/LabTalk/ref/Layer-cmd#-o.3B_execute_.28operate.29_the_specified_script_for_the_specified_layer

On the active graph page, you can refer to a layer by just index, like

layer -o 2 {layer.cmap.zmin=;layer.cmap.zmax=;}



CP
Go to Top of Page

Corny09

1 Posts

Posted - 06/22/2017 :  12:46:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I am not quite sure about it.
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