[Thread Prev][Thread Next][Index]

Re: [ferret_users] Frame/file= and Framing of the output image



One easy adjustment is to have PyFerret automatically draw thin outlines around its polygons, effectively covering up the thin white lines (grid pattern) that result from antialiasing, which blends into the background color (typically white).

From the PyFerret documentation:


SET WINDOW /OUTLINE=

When drawing color-filled rectangles and other polygons, this option allows one to specify the thickness of a outline to be drawn around each polygon. The color of the outline will be the same as the fill color. The main purpose of this option is to provide a work-around fix to some PostScript and PDF viewers that show thin white lines in FILL and SHADE plots. Typically only a very small value (0.05) is needed for this fix. If a value of zero is given, these outlines will not be drawn. The default behavior is to not draw these outlines.

Don't set this value too high though, or the outlines will become visible and start to overlap adjacent polygons.  (If you try setting it very high, you'll see what I mean.)

Andrew

---
Dr. Andrew T. Wittenberg
NOAA Geophysical Fluid Dynamics Laboratory


On Thu, Jul 7, 2022 at 5:35 AM Ryo Furue <furue@xxxxxxxxxx> wrote:
Dear Serena,

On Thu, Jul 7, 2022 at 5:09 PM Serena Illig <serena.illig.ird@xxxxxxxxx> wrote:
Dear Ryo,
I replied to fast.
With the latest version of PyFerret, when I use FRAME with the -nodisplay -scrip options, I end up having white horizontal lines over the coast topography (go fland 5 black)

That's a long-standing known problem, not only with Ferret but also with all sorts of graphical packages.

Search Google with "white thin lines PDF" without the quotation marks.  Also search the email archive of Ferret.

But the workaround is

1. Create a PDF file instead of PNG.
2. Rasterize it with antialiasing switched off, if the PDF file shows the thin white lines.

On the Net, You'll find a lot of discussion about the relation between antialiasing and the white lines.  Google again for "rasterization".

I guess the graphical engine for "-nodisplay" uses antialiasing and as a result, bakes white lines in the PNG image.  I hope PyFerret will be modified so that the white lines don't happen in the PNG images it produces.

Cheers,

Ryo


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

Privacy Policy | Disclaimer | Accessibility Statement