View previous topic :: View next topic |
Author |
Message |
joycea Apprentice
Joined: 23 Jul 2002 Posts: 191 Location: Kingston, Canada
|
Posted: Tue Jul 22, 2003 4:47 am Post subject: gnuplot background |
|
|
Is there a way to change the background color of a png plot produced by gnuplot?
I can't seem to find any way to do this although it seems like it would be nice to do in many cases. |
|
Back to top |
|
|
FormerSlacker Guru
Joined: 11 Mar 2003 Posts: 340 Location: Toronto, ON. Canada
|
Posted: Tue Jul 22, 2003 5:53 am Post subject: |
|
|
You can use something like this in your gnuplot options file.
Code: |
set term png small x999966
|
That will change the background color. The 999966 is a hex triplett color (in this example, 999966 is a tan color). You can use gimps color selector to figure out the hex triplett of whatever color you want, and then use that number and paste it into the file. Make sure you put an x before the triplett but do not include the pound character, "#", that is in gimps selector.
Or if your lazy you can browse through the hex colors over here.
You can include more then one color. The legend for the colors, as far as I can figure out is this:
set term png small (1) (2) (3) (4) (5)
(1) Background
The background color of your graph.
(2) Line color and text
The line color and default text color of your graph.
(3) ?
Doesn't seem to effect anything when set to a random color.
(4) First plot color
The color of your first plot of data, and all information regarding the first plot like the legend.
(5) Second plot color
The color of your second plot of data, and all information regarding the first plot like the legend.
I would guess that you simply keep on adding more colors to the set term line based on how many plots of data you have. If you don't specify a color, gnuplot chooses one automaticly.
All this is an eduacted guess on my part. I've been unable to find documentation on this subject. Gnuplot itself simply says:
Code: |
png Portable Network Graphics [small medium large] [monochrome gray color]
|
I hope this was somewhat helpfull. |
|
Back to top |
|
|
joycea Apprentice
Joined: 23 Jul 2002 Posts: 191 Location: Kingston, Canada
|
Posted: Tue Jul 22, 2003 3:42 pm Post subject: |
|
|
Thanks very much, that was exactly what I was looking for! |
|
Back to top |
|
|
FormerSlacker Guru
Joined: 11 Mar 2003 Posts: 340 Location: Toronto, ON. Canada
|
Posted: Tue Jul 22, 2003 6:30 pm Post subject: |
|
|
joycea wrote: | Thanks very much, that was exactly what I was looking for! |
You're welcome |
|
Back to top |
|
|
|