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
 scripts, y error bars
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bjanu

3 Posts

Posted - 02/17/2012 :  4:28:04 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating Syste
Hello i am new to origin and encountered this problem - i am trying to write a simple scipt that includes creating a graph and showing y errors. Tutorials say that plotxy iy:=(1,2,3); col(3) is supposed to be considered as error bar however it is ignored in my case. i also tried wks.col.type.4 this way i could get the collum to become error bar but it become only -+ while i needed it to become only positive or only negative, and still grap does't show anything but first 2 collums. So to put it simple could anyone tell me the best way to create y error markings on a graph using script.m:

Drbobshepherd

USA
Posts

Posted - 02/17/2012 :  5:09:52 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The plotxy X-function is probably ignoring the 3rd column because it is the wrong type. Try:

wks.col3.type=3; // Set col 3 to type Y-error
plotxy iy:=(1,2,3); Plot Scatter plot with y-error bars

Then double-click on one of the error-bars to open the Properties window and uncheck the + or - box in the Direction section.

DrBobShepherd
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 02/17/2012 :  5:16:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Oh! After you get your plot the way you want it, save it as a template (e.g. named MyScatterPlot) so you can call it in your script with:

plotxy iy:=(1,2,3) ogl:=[<new template:=MyScatterPlot>];

Hope this helps.

DrBobShepherd
Go to Top of Page

bjanu

3 Posts

Posted - 02/18/2012 :  05:37:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
well i tried to use my new saved templete where everything works, however the problem still occurs - graph doent display the y error bars, i noticed that my hand made template has 3 layers in the graph and the one generated by the script hasa only 1, so maybe template can not save all the layers and they properties at once?
Go to Top of Page

Penn

China
644 Posts

Posted - 02/20/2012 :  01:22:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please note that the function of plotting Y-Error for plotxy is available since Origin 8.5.1. So, please make sure that you are using Origin 8.5.1 or higher version.

If there are more than one layers in the graph template, you can firstly create the graph using this template, and then add the plot to the specified layer. For example:

range r1 = col(1);  // column 1
range r2 = col(2);  // column 2
range r3 = col(3);  // column 3
win -t p MyTemplate;  // create a graph window using the template
plotxy iy:=(r1, r2, r3) ogl:=2;  // plot XYError to the second layer


Penn
Go to Top of Page

bjanu

3 Posts

Posted - 02/23/2012 :  4:50:19 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you that was my mistake i used older version of origin and thus it was not working.
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