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
 Plotstack / Contour Plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

sebbey

Germany
70 Posts

Posted - 06/01/2012 :  10:41:16 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver.: 8.6.0G
Operating System: Windows 7 Professional

Hi Guys,

I'm currently trying to use the plotstack function to draw a contour plot and a simple line+symbol plot.

This is the code I use:
plotstack iy:=((47,49),(47,48,49)) plottype:=custom custom:="202 226" order:=0 legend:=0 unit:=3 gapy:=3 leftmg:=0 rightmg:=0 topmg:=0 bottommg:=0;


The Graph on top should be a symbol+line plot with col(47) beeing the x-axis and column(49) beeing the y-axis.
Underneath this Graph I want to draw a contour plot with col(47)=x, col(48)=y, col(49)=z.

Drawing the line+symbol plot works perfectly fine but I am not able to draw the contour plot.

Can somebody help me to solve this problem?

Thanks in advance!
sebbey

Kathy_Wang

China
159 Posts

Posted - 06/03/2012 :  11:11:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Sebbey,
The stack template doesn't support including contour plot, unfortunately. Besides, the plot type 226 requires input data to be a matrix object, not XYZ range.
However there is a workaround to generate a graph according to your need, that you first generate the line-symbol plot, then generate the contour plot, and merge these two graph windows together and arrange it as what you want.
To generate contour plot from XYZ dataset, you need to first highlight your Z column and use the code:
worksheet -p 243 TriContour;

As the TriContour template is used to plot color filled contour from XYZ dataset.
Note that if you want to select Z column with labtalk code, you may use:
wks.colSel(49,1);

Where 49 is your Z column index according to your script, 1 means you select the column. If you want to deselect, use 0 here instead.
To merge two graph windows, you may use the
merge_graph
x-function, for more details please refer to
http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:Merge_graph


Kathy
Originlab
Go to Top of Page

sebbey

Germany
70 Posts

Posted - 06/04/2012 :  02:51:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Kathy,

thank you very much. Your workaround does the job as well!

sebbey
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