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
 Add plots automatically
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

naetop

Japan
Posts

Posted - 12/15/2006 :  02:08:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:Xp

Hi,

I would like to use a program to add plots automatically.
A lot of data exists in the direction of the row
at one worksheet and I would like to many plots as follows.

(Label) X1,Y1,X2,Y2,....,X100,Y100
X-Axis Y-Axis
Plot1: X1 Y1
Plot2: X2 Y2
....
Plot100:X100 Y100

Usually, it is necessary to set them by hand power at Plot Setup.
But it is a troublesome task.
So I would like to operate automatically to add plots and change
symbols.

Q1.Could you please tell me how to make a program which does the
above-mentioned work(add courves and change symbols)?

Q2.My work is to make graphs from many data.
Which method of LabTalk and Origin C is suitable for my work?

Q3.Where of the manual and help should be referred to?

Best regards,
Naetop

Deanna

China
Posts

Posted - 12/15/2006 :  03:06:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Naetop.

Plotting can be done by selecting the columns and then generating the plot. If you want to plot all the columns in the worksheet, you will need to use loops. Please see the following simple example:

%a=%h; //Save the name of worksheet;
ncols=wks.ncols; //Get the number of columns in worksheet
for (ii=1; ii<ncols; ii+=2)
{
worksheet -s $(ii) -1 $(ii)+1 -1; //Select two columns
worksheet -p 201; //Generate a scatter plot
window -a %a; //Activate the worksheet
};



If you want to change the symbols, you can use the set command.

Both OC and Labtalk are fine for this task. You can choose either language you like.

You may take a look at the Overview of the LabTalk Language chapter in the Programming reference first.


Deanna
OriginLab Technical Services

Edited by - Deanna on 12/15/2006 03:08:28 AM
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