Hi,
Well, this is a little convoluted, but I have a method. The
existing automated methods are not that flexible just because
they're automatic.
First get the common vertical limits from a plot of all the
variables.
use
"http://apdrc.soest.hawaii.edu:80/dods/public_data/satellite_product/Ifremer/daily_flux"
plot/nolab/line/sym
sst[x=60,y=-30,l=3600:3670],airt[x=60,y=-30,l=3600:3670],sst[x=65,y=-30,l=3600:3670],airt[x=65,y=-30,l=3600:3670],sst[x=70,y=-30,l=3600:3670],airt[x=70,y=-30,l=3600:3670]
let ymin = ($yaxis_min)
let ymax =($yaxis_max)
Now plot each line with a desired symbol and color, and make the
legend. To use the legend.jnl script with legend line number 2, 3,
4, just list the variable multiple times in the plot command.
plot/set/vlim=`ymin`:`ymax`/nolab/line/sym=18/color=black
sst[x=60,y=-30,l=3600:3670]
go legend 1 sst60
ppl plot
plot/over/set/vlim=`ymin`:`ymax`/nolab/line/sym=20/color=red
airt[x=60,y=-30,l=3600:3670],airt[x=60,y=-30,l=3600:3670]
go legend 2 "airt60"
ppl plot/over
plot/over/set/vlim=`ymin`:`ymax`/nolab/line/sym=22/color=blue
sst[x=65,y=-30,l=3600:3670],sst[x=65,y=-30,l=3600:3670],sst[x=65,y=-30,l=3600:3670]
go legend 3 sst65
ppl plot/over
And so forth.
On 10/19/2015 3:55 AM, Sudheer Joseph
wrote:
Dear ferreters,
I am in a situation similar to the
example below where I need to add legends of my choice to my
line graphs. If I run below code I will get legend with
default colours of lines chosen by ferret ie sst60 with
black line airt60 with red and sst65 with green color etc
etc.
and legends will be created accordingly.
However I need to fix black color for sst and red color for
Airt and then have different symbols for distinguishing
between different longitudes and legends should appear
accordingly.
Please share if any one know how to achieve this.
use " http://apdrc.soest.hawaii.edu:80/dods/public_data/satellite_product/Ifremer/daily_flux"
plot/set/lin
sst[x=60,y=-30,l=3600:3670],airt[x=60,y=-30,l=3600:3670],sst[x=65,y=-30,l=3600:3670],airt[x=65,y=-30,l=3600:3670],sst[x=70,y=-30,l=3600:3670],airt[x=70,y=-30,l=3600:3670]
go legend 1 sst60
go legend 2 airt60
go legend 3 sst65
go legend 4 airt65
go legend 5 sst70
go legend 6 airt70
ppl plot
with best regards
Sudheer
**********************************************************************************
Dr. Sudheer Joseph
Scientist,
INCOIS, MoES, Govt. of India.
"OCEAN VALLEY" , Pragathi Nagar (BO), Nizampet SO,
Telangana, India. PIN- 500 090.
Tel: +91-9440832534(Mobile) Tel: +91-40-23886047(O),Fax: +91-40-23892910(O)
E-mail: sjo.India@xxxxxxxxx;
sjo@xxxxxxxxxxxxx.
-------------------* --------------------
"The ultimate measure of a man is not where he
stands in moments of
comfort and convenience, but where he stands at
times of challenge and controversy."
Martin Luther King, Jr.
***********************************************************************************
|