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
 same color for two dataplots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

flombone

Italy
3 Posts

Posted - 07/22/2013 :  07:10:05 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin pro 9.0.0
Operating System: windows 7 pro


Dear all,

I am plotting two series X1,Y1, X2,Y2 on the same graph (same layer) with the command:
plotxy iy:=((1,2),(3,4)) plot:=200;
The problems come when I try to change the colors and the width of the two series. I would like to use the same color for both plots. Can anyone please help me? It should not be too difficult, but I had no success so far.

Thanks in advance,

Paolo

greg

USA
1378 Posts

Posted - 07/22/2013 :  10:05:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When you pass multiple XYRanges to plotxy, Origin groups those plots by default. You cannot change individual member properties when grouped. You could create the first plot then add the second, at a cost of few more lines of script, but you could also ungroup the plots then use the SET command to change plot properties:

plotxy iy:=((1,2),(3,4)) plot:=200; // This creates a Grouped plot
layer -gu; // This ungroups
range raPlot1 = 1; // Range pointing to first plot
range raPlot2 = 2; // Range pointing to second plot
set raplot1 -c 5; // Set color of first
set raplot2 -c 5; // then second

Consult the Help for the SET command to access other plot properties.
Go to Top of Page

flombone

Italy
3 Posts

Posted - 07/24/2013 :  08:52:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
works perfectly, thank you greg!

i had tried to ungroup the plot, the missing step was the line:
range raPlot1 = 1

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