[Thread Prev][Thread Next][Index]

Re: How can I draw a single color bar for multi-panel plots?



On Tue, 19 Apr 2005 Yun.Li@csiro.au wrote:

> Could you please let me know how to draw a single color bar for
> multi-panel plots, for example, a common color bar for SST in four
> seasons displayed in left and right plots of the upper and lower panels?

Hello Yun Li,
	If the number of panels along the edge where you wanted to
place the color bar were odd I would turn off (/nokey) the color bar
for all but the center one.
	But with an even number of panels it is probably easiest to
have a fake panel, overlaying all the others, in which you turn off
all the axes and labels and make sure no data in the contoured range
appear. In the individual panels of course the "/lev=(...)" option
must be used to ensure that all share the same color bar.
	Below is a quick demo. For production one would choose the
individual viewports more carefully to avoid the overlap and perhaps
use "shakey" to draw the key better.
	Good luck,
		Mick

!------ demo of a shared color bar -------

ppl axset,0,0,0,0   ! turn off all axes

set view full       ! this will be for the desired color bar
! choose a 2-d variable to shade with value outside color bar range
shade/nolab/i=1:8/j=1:6/lev=(100,2200,100) 0*(i+j)

ppl axset,1,1,1,1   ! turn axes back on

set view ul
shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 50*(i+j)
set view ur
shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 75*(i+j)
set view ll
shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 100*(i+j)
set view lr
shade/nolab/i=1:8/j=1:6/lev=(100,2200,100)/nokey 150*(i+j)


|!!! Mick.Spillane@noaa.gov !!!|
|__Room 2070 Bldg#3 NOAA/PMEL__|
|____Phone_:_(206)526-6780_____|



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement