[Thread Prev][Thread Next][Index]
Re: black bg and gif
Hi Martinho,
Maybe somebody else will have a more elegant solution for piping
a script name and arguments into Ferret, but one way to do it would
be to have a script that calls the go script with arguments. So for
example a script called do_execute.jnl would contain the lines
go execute.jnl image.gif file.dat 123
exit
and you can then run it with
> ferret -gif < do_execute.jnl
As far as the "go black" script, the black background does not appear
to function in gif mode, but only for xwindows output from Ferret.
We'll look into why this is, but here is a way around it.
You can set a viewport covering the entire window and fill that with
black (or any other color) and then make your plot in an identically-
sized viewport which will appear on top of the first one. Setting the
foreground pen to white does work in gif mode.
! Define a viewport with the /AXES qualifier so there are no margins
DEFINE VIEWPORT/X=0:1/Y=0:1/AXES full2
SET VIEW full2
SHADE/I=1:2/J=1:2/PALETTE=black i+j
! Now set to the pre-defined viewport FULL
! Set the main pen color to white (as in the script black.jnl)
SET VIEW full
PPL COLOR 1 100 100 100
GO ptest ! a test plot
This gives us a lot more flexibility with colors. Try this:
DEFINE VIEWPORT/X=0:1/Y=0:1/AXES full2
SET VIEW full2
SHADE/I=1:2/J=1:2/PALETTE=yellow i+j
SET VIEW full
PPL COLOR 1 100 0 0
GO ptest
Martinho Marta Almeida wrote:
> Hi, I got some problems with go black. when I use the following comands, image_name.gif has no background or axis !!!
> And theres something else, I wanna do something like:
> >>ferret -gif < execute.jnl
> but wanna have input arguments, for instance, for image_name ($1); test.dat ($2) and T0 ($3)
>
> I tried:
> >>ferret -gif < execute.jnl image.gif file.dat 123
> but doesnt work
>
> Thanks in advance,
> MMA
>
> file/col=2/var="var1,var2" test.dat !!! input
> go black
> go graticule
> plot/vs/nolabels/line=10/set_up (var1-var1[i=1])/86400*24,var2
> ppl ylab Amplitude (m)
> ppl xlab Time (h) since T0 !!! input
> ppl plot
> frame/file=image_name.gif !!! input
> exit
--
Ansley Manke Pacific Marine Environmental Laboratory Seattle WA (206)526-6246
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement