Author |
Topic |
|
a.abc.b35
175 Posts |
Posted - 03/03/2015 : 2:52:53 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): 8.5 Operating System:win 7
---- Hi experts,
I need a quick help with plotting large data sets. The problem is as below:
I have data in matlab "matrix" format which I could drag and drop in origin to open it. It creates multiple worksheets in the workbook with all the value cells in yellow which tells me the workbook is being treated as an matrix (as it should be). Now, in the workbook, there are following worksheets which is relevant to me: 1. Worksheet "X": It has all the x-values. The data is displayed as a single row (value cells in yellow) and with 5000 columns. 2. Worksheet "Y": For above 5000 x-values, I have 5000 columns of y-data. Each column is, say, 30 row long; total of 5000 columns. 3. Worksheet "Z": Similar to worksheet "Y" but with the z-values.
I want to generate a 2D plot where X values are in x-axis, Y values are along y-axis with Z values as the 3rd variable which will have different color schemes. I have inserted a sample figure for you to see.
I will really appreciate if someone here could help me out with this. I have 20 such files.
Till now, I have figured that my X-values should be input in the numbered X-column of the matrix and the Y-values must go into the numbered Y-columns of the matrix with Z-values as the cell-values (marked yellow). But I have no idea how to change the numbered X and Y-column values to my custom values. Right now those are 1,2 ,3 ,4 ,5 ,6 ...and so on.
Also, would it be possible to obtain a stacked image like the one shown below in origin (the top plot is same as the previous image; bottom one here is a simple X-Y2 plot which I will be able to generate ):
Thanks in advance and I look forward to hearing from you soon.
-- AB |
Edited by - a.abc.b35 on 03/03/2015 2:59:45 PM |
|
a.abc.b35
175 Posts |
Posted - 03/03/2015 : 3:35:02 PM
|
Update: I am trying to follow the instruction in this video: https://www.youtube.com/watch?v=w75UD-gzLJM
But the problem seems like origin is unable to handle unevenly spaced X-values. That is a bummer for me. Can anyone help me out please.
AB |
|
|
snowli
USA
1398 Posts |
Posted - 03/03/2015 : 4:03:52 PM
|
Hi AB,
Could you also have a screenshot of your X sheet, Y sheet and Z sheet? I am wondering what Y sheet looks like, are values in each column the the same?
Your data may need to be reorganized before being above to plot the colormapped contour plot.
We can convert your X, Y and Z sheet into X, Y and Z columns in a worksheet. We also have concept of Virtual Matrix. So X, Y data don't need to be evenly spaced. http://www.originlab.com/index.aspx?go=Products/Origin/DataManagement/WorkbooksAndWorksheets&pid=1713
And it's very easy to put two separate graphs first. Then choose Graph: Merge Graph Windows to merge them into one graph. Arrange the layout e.g. 1 column x 2 rows so they look like stacked.
Thanks, Snow
|
Edited by - snowli on 03/03/2015 4:05:54 PM |
|
|
a.abc.b35
175 Posts |
Posted - 03/03/2015 : 5:05:45 PM
|
Here you go:
I typed my last update before seeing your post, Snow.
--- I will try the virtual matrix method -- the problem is with Origin trying to convert my data into evenly spaced ones which they are not.
AB |
|
|
snowli
USA
1398 Posts |
Posted - 03/03/2015 : 5:33:16 PM
|
Hi AB,
After importing the mat data, you can click New Workbook button (3rd button on Standard toolbar) to create a workbook. Not the Matrix window (yellow background).
Then copy X data and paste them into 1st row, starting from 2nd column. copy Y data and paste them into 1st column, starting from 2nd row. Then paste Z data in.
Then you can highlight all worksheet, and choose Plot: Contour: Color Fill. --> It will open a plot_vm dialog for you to specify where your X, Y data are from.
Choose Data Format: X across columns. X Values in: 1st row in selection. Y Values in: 1st column in selection.
Click OK to plot the contour graph.
Then you can plot the other graph you want.
Finally you can choose Graph: Merge Graph Windows... menu to merge them.
Thanks, Snow
|
|
|
a.abc.b35
175 Posts |
Posted - 03/03/2015 : 8:22:36 PM
|
Hi Snow,
I got it working with the virtual matrix... only problem I am facing now is how to control the color scheme of the contour plot. Is there a way i can fix it between two values I would like?
Thanks, AB
AB |
|
|
a.abc.b35
175 Posts |
Posted - 03/04/2015 : 09:31:18 AM
|
Hi Snow, I figured how to change the color scheme -- it is actually in the above link you posted but for surface plots.
One last thing remains on my part: I would like to remove the "black" colored contour lines from the plot and just have it in the color scheme. Where do I locate that option of hiding the contour lines. Please let me know.
Thanks, AB
AB |
|
|
a.abc.b35
175 Posts |
Posted - 03/04/2015 : 09:39:01 AM
|
Never mind, the instructions are as below (for anyone else who might be interested):
Turn off all contour lines: Double click on the plot to go to Plot Details then in the Colormap/Contours window, click on tab for "Line", uncheck "Show on major levels only", then click on "Hide All". Say OK-->Apply-->OK. This will only keep the color scheme -- no contour lines.
Also posted by vincenth here: http://www.originlab.com/forum/topic.asp?TOPIC_ID=9112 -- AB
PS: Please consider this thread as solved
AB |
Edited by - a.abc.b35 on 03/04/2015 09:40:10 AM |
|
|
snowli
USA
1398 Posts |
|
Hideo Fujii
USA
1582 Posts |
Posted - 03/04/2015 : 1:54:52 PM
|
Hi AB,
Just for the future reference, when you have many XYZ triplet worksheets, you can try the following script to make a virtual matrix:Function int makeVM(string rowds, string colds, string bodyds) {
type -a makeVM: Row Data:%(rowds$), Col Data:%(colds$), Data Body:%(bodyds$);
window -a %(rowds$);
range bk1=[rowds$]1;
range bk2=[colds$]1;
range bk3=[bodyds$]1;
wappend irng:=(bk1,bk3) method:=row; //append rowds and bodyds
worksheet -s 1 0 1 0;
menu -e 36441; //insert a column at col1
range bk2c1=[colds$]1!col(1);
nwBk2=bk2c1.getSize()+1;
range bk1r2=[rowds$]2!1[2:nwBk2];
range bk2=[colds$]1!1;
bk1r2=bk2; //copy col data to the 1st col
return 0;
} To run this function, you can issue a command like:makeVM(Book1, Book2, Book3); when Book1 for X row, Book2 for Y column, and Book3 for the data body.
Regards,
--Hideo Fujii OriginLab |
|
|
a.abc.b35
175 Posts |
Posted - 03/08/2015 : 03:01:28 AM
|
Thanks to both of you; I am a little perplexed at origin's randomness in copying around 5000 columns of data (single row)...if i select the whole row and right click to copy; sometimes the option for copy shows up and sometimes it is grayed out and I can not copy at all. Please help.
AB |
|
|
a.abc.b35
175 Posts |
Posted - 03/08/2015 : 2:11:43 PM
|
I am really fed up with Origin (I am using it for last 7 years but this is something I never expected) at this point and am seriously considering going to other software for processing my data sets... $500/yr of license fees and it can not handle even datasets 500x5000 wide in the.. can not copy, paste, delete etc. for datasets even 300x 50 wide....it will hang forever... i have been trying to arrange a dataset for last 12 hours...to no avail...this is just not acceptable after paying $500/yr
AB |
|
|
snowli
USA
1398 Posts |
Posted - 03/09/2015 : 11:09:33 AM
|
Hi AB,
We are sorry for the trouble you are dealing with.
Do you mind sending your opj or dat to tech@originlab.com so we could look further into this. Our latest version is Origin 2015. But even in Origin 8.5, copy row(s) with 5000 columns work.
For big opjs, Auto-save feature may interrupt your work. So you can choose Tools: Options. Go to Open/Close tab and uncheck Autosave project checkbox or change the frequency of auto save.
Thanks, Snow Li OriginLab Corp. |
|
|
|
Topic |
|
|
|