Changing background and front color in plplot library

The default background color in plplot library is black while the frontcolor is red. To do this, use plscolbg and plcol0 function. The code in fortran is:


call plscolbg(255,255,255)
call plinit()
call plcol0(8)

Remember that plscolbg must be called before plinit. The above code change the background color to white (rgb=255,255,255) and the front color to brown (8, refer to manual).

Note also that changing the background color will affect the color map 1 which is used for plotting continuous data. The reason is that color map 1 range from blue to red passing through the background color (default).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: