Author |
Topic  |
|
touch41
16 Posts |
Posted - 09/10/2012 : 2:31:50 PM
|
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
|
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 |
 |
|
touch41
16 Posts |
Posted - 09/11/2012 : 5:11:03 PM
|
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 |
 |
|
|
Topic  |
|
|
|