Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gnuplot background
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
joycea
Apprentice
Apprentice


Joined: 23 Jul 2002
Posts: 191
Location: Kingston, Canada

PostPosted: Tue Jul 22, 2003 4:47 am    Post subject: gnuplot background Reply with quote

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
View user's profile Send private message
FormerSlacker
Guru
Guru


Joined: 11 Mar 2003
Posts: 340
Location: Toronto, ON. Canada

PostPosted: Tue Jul 22, 2003 5:53 am    Post subject: Reply with quote

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
View user's profile Send private message
joycea
Apprentice
Apprentice


Joined: 23 Jul 2002
Posts: 191
Location: Kingston, Canada

PostPosted: Tue Jul 22, 2003 3:42 pm    Post subject: Reply with quote

Thanks very much, that was exactly what I was looking for!
Back to top
View user's profile Send private message
FormerSlacker
Guru
Guru


Joined: 11 Mar 2003
Posts: 340
Location: Toronto, ON. Canada

PostPosted: Tue Jul 22, 2003 6:30 pm    Post subject: Reply with quote

joycea wrote:
Thanks very much, that was exactly what I was looking for!


You're welcome :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum