Return to Ferret FAQ


Setting plot background color


Question:

How can I set the background of a plot to a custom color? 

Example:


[Output Graphic]

Solution:

Ferret has a simple technique -- viewports -- that can do a 100% job of filling the background -- or any portion(s) of it -- with your choice of colors. Multicolored backgrounds are possible through straightforward extension using multiple viewports.

Example: -- using overlapping viewports

! Use identical viewports "full" (predefined) and "full2"
define view full2

! Set the background color
set view full
go magnify 1000
shade/i=1:2/j=1:2/palette=red/nolabels/nokey 0*(i+j)

! Now make your plot in the viewport "full2"
set view full2
go ptest


Last modified: Dec 3, 1998