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
 How to create a color map graph via LabTalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Ralph Stuebner

Munich, Bavaria, Ger
9 Posts

Posted - 07/30/2001 :  08:07:22 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I want to automatize the generation of color mapped scatter graphs. Therefore i need a lab talk command, which generates a scatter plot from two columns and indexes the plot with a third column for the different colors.

Thanks Ralph Stbner

Barb Tobias

USA
305 Posts

Posted - 07/30/2001 :  3:30:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You could use the wks.colsel method to select the X, Y, and color map index columns. You could then use the worksheet -p command option to plot the selected data into the scatter template with color mapping on.
So if your worksheet was set up as X, Y, Y (color map indexes), then you could use something like this:
wks.colsel(1,1); //select col 1
wks.colsel(2,1); // select col 2
wks.colsel(3,1); // select col 3
worksheet -p 247 scatter; // plot columns into scatter template using color mapping

Go to Top of Page

Ralph Stuebner

Munich, Bavaria, Ger
9 Posts

Posted - 07/31/2001 :  09:51:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you.
So far it works. But if I build up a loop (with "for(n=3;n<=10;n++)") to make several plots with each containing the data of column 1, 2 and n only one plot is generated and you see the data of the n th column only. How can I force Origin to produce more than one plot.
Go to Top of Page

Barb Tobias

USA
305 Posts

Posted - 07/31/2001 :  1:15:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This is a little rough... but it could be a starting point. I assume your worksheet is named data1 and that you have four columns of color map data - starting with column 3.
wks.colsel(1,1);
wks.colsel(2,1);
for (ii=3;ii<=6;ii++)
{
wks.colsel(ii,1); //select color map column
worksheet -p 247 scatter; //plot
window -r %H graph$(ii); //rename graph
window -a data1; //reactivate worksheet
wks.colsel(ii,0); //deselect color map column
}

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