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
 Origin Forum
 a contour plot by using three sets of matrices

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
vahidh Posted - 06/06/2017 : 11:20:18 PM
I am trying to generate a contour plot in originpro. I was successful to make this plot in matlab by using 3 sets of matrices. The related explanation is provided here from matlab website.

Does anyone know how to do the same in originpro? Thank you


contourf(X,Y,Z), contourf(X,Y,Z,n), and contourf(X,Y,Z,v) draw filled contour plots of Z using X and Y to determine the x and y values.

If X and Y are matrices, then their sizes must equal the size of Z. Typically, you should set X and Y so that the columns are strictly increasing or strictly decreasing and the rows are uniform (or the rows are strictly increasing or strictly decreasing and the columns are uniform).
3   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 06/08/2017 : 06:33:17 AM
Hi Vahid H,

I am sorry that we don’t support to create a contour plot directly from three different matrices(X, Y, Z) at present, but I have a workaround for what you want:

I suppose you have three matrices in the project, now you can
1. Convert three matrices to three worksheets respectively
(Select Matrix: Covert to Worksheet from Origin menu, and then select XYZ columns in Method item)
2. Put the Z columns of the three worksheets to a new worksheet together, and set as X column, Y column and Z column correspondingly.
(Select Worksheet: Copy Column to from Origin menu)
3. You have a new XYZ vector to create a contour plot now

I also have a piece of script for you. You can execute it in Script Window

//New 3 workbooks for converting matrices
loop(ii, 1, 3)
{
	newbook name:= "WBook$(ii)" option:=lsname;
}
//New workbook for result
newbook name:= "Result" option:=lsname;

ii = 1;
//Loop over all matrix books in project
doc -e M
{
	str$ = "WBook" + "$(ii)";
	m2w method:=xyz ow:=[%(str$)]Sheet1!;
	colcopy irng:=[%(str$)]Sheet1!Col(3) orng:=[Result]Sheet1!Col($(ii));
	ii++;
}



Hope it helps.

Regards,
Yuki
OriginLab
vahidh Posted - 06/07/2017 : 12:48:53 PM
Thank you, Yuki. In the content of the link that you sent me contour plot based on three vectors are mentioned. Please correct me if I am mistaken. I am interested in the contour plot of three different matrices(X, Y, Z).


quote:
Originally posted by yuki_wu

Hi,

Do you want to plot a contour from XYZ data? Please take a look at this tutorial:
http://www.originlab.com/doc/Tutorials/XYZ-Contour

Hope it helps.

Regards,
Yuki
OriginLab




Vahid H
yuki_wu Posted - 06/07/2017 : 01:24:52 AM
Hi,

Do you want to plot a contour from XYZ data? Please take a look at this tutorial:
http://www.originlab.com/doc/Tutorials/XYZ-Contour

Hope it helps.

Regards,
Yuki
OriginLab

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