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
 Display multiple result plots in single page (4x4)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

wanderlust

USA
Posts

Posted - 10/25/2004 :  4:43:59 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): origin 7
Operating System: windows xp

If I have several data sets, each of which contains 1000x4x4 data (4x4 channels, each channel has 1000 points), and I want to plot all these 16 channel data in one plot. In this plot, there will be 4 rows and 4 columns, and totally 16 figures.

How can I do this?

PS. I am a new user of Origin 7, and have only few experience in programming C. Where should I start?

Thank you!!

easwar

USA
1965 Posts

Posted - 10/25/2004 :  10:12:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Not clear if you want to do this manually or programmatically.
You can create a 4 rows x 4 columns arrangement of 16 layers and plot each dataset in one layer.
Start with a default plot such as a line plot for one dataset, and then use the Tools->Layer menu to bring up the Layer tool. Click on the Arrange tab, and enter 4 in the Columns and Rows edit box, check the Add New Layers check box, and click the Arrange button to create the 16 layers.
You can then move datasets into each layer by drag-and-drop from your worksheet, or double click on each layer icon at top left and move in the datasets.

Once you have customized your plot, you can save it as a template for future use with the File->Save Template As menu item.

For programmatic access, you can then open the custom template you saved using Origin C code and add dataplots to each layer. Post in the Origin C forum for help with Origin C programming.

Easwar
OriginLab

Go to Top of Page

wanderlust

USA
Posts

Posted - 11/10/2004 :  3:40:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
But, if my database is very large, say 1000x16x16.
I want to display 16x16 array of data (16 rows and 16 column), is there any faster way to do it?
Thanks!
Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/10/2004 :  3:50:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Perhaps I am not understanding your need correctly (you posted in the Origin C forum today and I posted a similar reply there as well). It would help if you describe in some more detail what you want to achieve. Are you saying, for instance, that you want to fetch one record after another from the database, and with each record an existing 16-panel graph updates with new data? If this is the case, you can manually set up the graph, and then just fetch new data into the worksheet each time. An Origin graph can be set up to update automatically when data is changed, including rescaling of axes as needed.

Perhaps it would work better if you called tech support and described your needs and someone walks you thru the best apporach to your situation.

Thanks,

Easwar
OriginLab

Go to Top of Page

wanderlust

USA
Posts

Posted - 11/11/2004 :  10:30:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry, I didn't make my question clearly.
Simply to say, I have 256 sets of data, and I want to display all of them in one figure. What I want to do is to draw a figure which contains 256 "subfigures". These "subfigures" are arranged in 16 rows and 16 columns. Just like an 16x16 array, each element of the array is one "subfigure".

Hope I didn't make thing worse~~ ^__^
Thanks!
Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/11/2004 :  10:53:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Thanks for the response. Currently there is a limit of 81 layers (sub figures) per graph (figure). So the most you can have is an arrangement of 9x9.

If that will work for you, you can create a template of 9x9 arrangement as follows:
-> Create a new (default) graph (which has one layer)
-> Use the Edit->Add and Arrange Layers menu item and enter 9 for num rows and num cols. Click Yes on the next dialog
-> Specify 0 for horizontal and vertical gap
-> The graph will now have 81 layers
-> Save this graph as a template, say with name "MyFigure.OTP"

Then, programmatically, you can create a new instance of the graph template you saved above, and move in data sets from worksheet columns into each layer. See the Programming help file, and the subtopic: "Origin C Programmer's Guide->Plotting and Customizing Graphs".

Easwar
OriginLab


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/11/2004 :  11:22:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you just need to create a figure with all 256 plots you might consider creating four 8x8 graphs in the manner described by Easwar and combining them on a layout page...

1. Click the New Layout button on the standard toolbar.
2. Layout->Add Graph (4 times)
3. Size and position as desired.

Mike Buess
Origin WebRing Member
Go to Top of Page

wanderlust

USA
Posts

Posted - 11/13/2004 :  3:23:28 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your answer. I still have two questions:
1. The New Layout button on my toolbar can not be used. Does that mean I don't have this function?
2. Since I have 256 sets of data, it's unconvenient to draw 256 subfigures manually. If I wish to achieve the goal: once I import the worksheet (which contains 256 sets of data), it can automatically draw 256 subfigures in one graph. What should I do?

Thanks for your kindness help.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/13/2004 :  6:21:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
1. What do you mean by "can not be used"? Is it disabled? In any case try File->New and select Layout. If that doesn't work enter the following command in the script window...

win -t Layout Layout;

2. I was suggesting that you follow Easwar's instructions but create an 8x8 arrangement rather than 9x9. It might still be tedious to manually assign datasets to 64 layers so I will suggest a simple LabTalk script that might help. It assumes that you've created an 8x8 graph with no data and saved it as a template called PAN64.otp. The worksheet containing your data must be active when you run the script. The script also assumes that the worksheet contains one X column (first col) and 256 Y columns. Copy the script lines from this post and paste them to the script window. Then select all lines in the script window and press Enter to execute.

%W=%H; // worksheet name
loop (i,0,3) {
win -t P PAN64; // open a graph from your template
jj=64*i;
loop (j,1,64) {
kk=jj+j+1; // column number
page.active=j; // activate layer j
layer.include(%(%W,kk),200); // create line plot
lay -a; // rescale to show all data
};
};

That will create four graphs with 64 dataplots each. You can customize each layer within the inner loop. See the layer object in the Programming Guide for layer properties.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/13/2004 6:26:39 PM
Go to Top of Page

wanderlust

USA
Posts

Posted - 11/15/2004 :  10:59:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
I've tried your script and it works. However, it created four graphs with 64 dataplots each. I know I can use Layout to combine these four graphs together, but it will destroy the sequence of the data.
I need to arrange these 256 dataplots in the order of 1 to 256. How to achieve this goal?

Many thanks for your help!
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/15/2004 :  12:04:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I think the following script will create the arrangement you want. It adds the columns in this order...

graph1: col 2-9,18-25,34-41,...,114-121
graph2: col 10-17,26-33,42-49,...,122-129
graph3: col 130-137,146-153,162-169,...,242-249
graph4: col 138-145,154-161,170-177,...,250-257

// Script starts here
%W=%H;
loop (m,0,1) {
loop (k,0,1) {
win -t P PAN64; // create graph
%P=%H; // save its name
loop (i,0,7) {
ii=8*i;
loop (j,1,8) {
jj=ii+j; // layer #
kk=(2*ii)+(8*k)+(128*m)+j+1; // col #
//ty %P, layer $(jj): col $(kk);
// uncomment the previous line to print col order to script window
page.active=jj;
layer.include(%(%W,kk),200);
lay -a;
};
};
};
};


Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/15/2004 12:06:59 PM
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