[Thread Prev][Thread Next][Index]

Re: right_axis_plot.jnl - an alternate approach

Hi Vincent,
In regard to your further question regarding the options available
you should consult the scripts themselves which are at
on my machine.  You can probably find them on your machine using
	Fgo left_axis_plot

The .jnl files in this directory are usually documented as to usage
and you can always take a copy and make minor changes to suit your

Actually, in this case, left_axis_plot and right_axis_plot may not
be flexible enough.  Here's an alternate approach:

If you have several lines to associate with the left
and right axes it may be easier to skip left_yaxis_plot and
right_axis_plot altogether.  For example if you define two identical
viewports "under" and "over" as follows then the final plot can be
built in two parts:

	! viewport definitions
        ppl size 10 8 ; ppl axlen 8 6 ; ppl origin 1 1
	def view/size=1/orig=0,0/clip=1,1 under
	def view/size=1/orig=0,0/clip=1,1 over
        ! plot first two lines in viewport under
	set view under
	plot/i=1:10/nolab/set i,11-i ! nolab drops sample lines
	ppl axset,,,,0 ; ppl plot ! turn off the right hand axis
	! plot second two lines in viewport over
	set view over
	plot/i=1:10/nolab/set 1/i,1/(11-i)
	ppl pen,1,3 ; ppl pen,2,4 ! use pens 3,4 for new lines
	ppl axset,0,0,0,1 ; ppl axlabp,,1 ! turn on only right axis
                                          ! and place yaxis values there
	ppl plot
	! then add a custom line key using alines or simply
  label/nouser 4 6.5 0 0 0.16 Key: Var1, @p2Var-2, @p3Var-3, @p4Var-4

Hope that works for you Vincent,

|__Room 2070 Bldg#3 NOAA/PMEL__|

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement