[Thread Prev][Thread Next][Index]

Re: [ferret_users] color of multiple x-axis



Hi Jang,

Here is one way to add extra axes with different colors. It may not
however match the way in which you currently generate the lines on the
plot itself, so you may need to change the way in which you do that in
order to get it to work.

The keys to the demo below are that ferret draws the axes with "pen 0"
and also that the underlying plotplus (ppl) graphics provides "Advanced
Commands" to draw arbitrary x-axes/y-axes with "ppl %xaxis"/"ppl %yaxis".

! draw a plot with three lines
plot/i=1:10/nolab 0.2*i,1/i,1/(11-i)
! add a red x-axis to go with the red line ...
ppl pen,0,2 ; ppl %xaxis/nouser 0,6,1,-0.4
! ... and a green x-axis to go with the green line
ppl pen,0,3 ; ppl %xaxis/nouser 0,5,1,-0.8
! ... set pen-0 back to its normal black
ppl pen,0,1

The resulting image is attached. If this looks at all promising you will
need to look at the %xaxis command in the "Advanced Command" chapter of
the Plotplus manual. There is another command -- transxy -- that may
help in preparing the separate lines for the initial plot, before you
start adding the extra axes.
Other options would be to look at the multi-axis script that you may
currently be using, taking a copy of it, and editing in pen-0 and %xaxis
commands. Another might be to add the colored axes in overlay plots.

Good luck,
Mick
-----------------------
Chan Joo Jang wrote:
>
>
> Dear Ferret users:
>
> I wonder if ferret can have different colors of each axis line when I
> use multiple x-axis.
>
> In other words, how can I have, say, a red x-axis line?
>
> Jang
>
>
>
> ------------------------------------------------
> *Currently at Dep. of Oceanography, Texas A&M Univ*
> Chan Joo Jang, Ph.D., researcher 
> Korea Ocean Research and Development Institute
> 1270 Sa2-dong, SangRok-gu, Ansan  426-744, Korea
> Tel: +82-31-400-6317 Fax: +82-31-408-5827
> cjjang@kordi.re.kr <mailto:cjjang@kordi.re.kr>, http://ogcm.kordi.re.kr
> ------------------------------------------------ 
>
>   

GIF image


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement