[Thread Prev][Thread Next][Index]

Re: [ferret_users] plot with an image as background

Hi JQ,

| How to use ferret to set an image file (maybe gif format) as the
| background, Other plotting will overlay on top of it?

I don't know if it's possible to do it interactively, but you can
add your background later:

1) Plot something on Ferret and generate an EPS of the plot.

2) Convert it to a PNG file:

  $ convert -density 200 ferretplot.eps ferretplot.png

 Here "density" is the resolution in DPI.  For oral-presentation
 slides, 100 to 200 is usually good enough.

3) Overlay it on your background image:

  $ convert -coalesce mybg.jpg ferretplot.png merged.png

  You'll obtain merged-0.png and merged-1.png, the latter of
  which is what you want.

  But, I don't know how to adjust the relative sizes of the
  background and the plot.  You may have to fiddle with the
  metadata denoting the physical sizes (DPIs) of your images.

One caveat is that missing values of the variable you plotted
is converted to transparent by the convert command.  So, in
the final merged image, the original missing values become
"windows" to the background image, through which you can view
the background.

To avoid that, you would have to paint the missing regions
in white.


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement