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
 Histogram plot color
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

touch41

16 Posts

Posted - 09/10/2012 :  2:31:50 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello!

Quick question: I want to plot an histogram from an Y range...and I want it to be red.
Now I use this command:
plotxy [%(name$]Sheet1!Col(PosD) plot:=219 color:=2;

but, no matter which number I put after color, I always get it black!

what am I mistaking?

Thank you for your help!:-)

Best,

Matteo




Origin Ver.8.5 and Service Release 1
Operating System: Win7 pro

Drbobshepherd

USA
Posts

Posted - 09/11/2012 :  11:45:23 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Matteo,

I believe this is a bug in Origin. The Color attribute works with Line plots and Scatter plots, but not in the case of Column plots, (which is basically what histogram plots are). I have found a good work-around is to use a graph template.

Create your histogram chart, and edit it so it looks the way you want. Then save it as a template using a unique name, such as "MY_COLUMN". Then call the template in your script as part of the ogl variable in your plotxy command.

For example:

plotxy (1,2:3) plot:=203 legend:=1 ogl:=<new template:=MY_COLUMN>;

This will create a Column plot in a new graph window using col(1)for X and col(2) thu col(3) for Y. The colors, spacing, fill patterns, stack/no-stack, ...etc. will be determined by my graph template file, MY_COLUMN.otp.

DrBobShepherd
Go to Top of Page

touch41

16 Posts

Posted - 09/11/2012 :  5:11:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi DrBobShepherd,

thank you very much for your help.
I came up with your same solution...but I was looking for a more "elegant" way of doing it and I was wondering if I was mistaking something.

Thank you very much indeed!:-)

Best,

Matteo
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