Re: x11 and pdf

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 9 Mar 2006 22:36:00 -0700 (MST)

Hi Folks,

I just wanted to update the ncl-talk group what the problem and
solution was for this particular question.

In the script the line thickness was being set to 10 (the default is
1) in order to get significantly thicker lines. On an X11 window, the
lines were appearing thick enough such that they were running into
each other creating a solid black mass of bars. (I believe
this was the intended result.) However, in a PostScript file, the
black mass of bars had white vertical lines running through it.

Effectively, what was happening here is that the line thicknesses in
the PostScript file were being drawn thinner than in the X11 window,
and hence they were *not* running into each other.

This is due to a number of factors; one being that each output device
(X11, PS, PDF, etc) has its own definition of what the default line
thickness is. A line thickness of a specified width on a PostScript
output device may look thinner than the same line thickness specification
on an X11 window. Refer to the attached images to see the difference
in linewidths output to PDF and to X11. The results for X11 output
will vary depending on the resolution of the output device, so what
you get may not look like what is seen in the attached image.

Another thing being done in the script was to set the line thickness
to 0.001. I believe this was done to effectively "zero" out a set of
lines so that they didn't appear at all. However the PostScript
language specification declares that the minimum line thickness
allowed is defined as one pixel, so you will always see a line
even if you set the thickness to 0.

If you are trying to "zero" out a line, we recommend doing it some
other way than setting the line thickness to 0. For example, you can
draw it in the background color. This way you will get the same
results for X11 or PostScript.

There is a common misconception that the linewidth scale factor will
produce lines that are exactly that factor bigger than normal. In
fact the scale factor may have no effect, or unexpected effects. In
general the scale factor is applied to the default line width of the
device and maps onto the nearest available hardware line width that a
device supports. This may be the default line width. What a given
device considers its default line width can vary from barely visible
to fat. Notice in particular that line thicknesses for X11 output
below 0.5 disappear - they are mapped to the nearest available width,
which is zero.

If you are going to change your line thicknesses to make them wider,
just be aware of the various output device differences. You may need
to make the lines slightly thicker for PostScript if you plan to
compare them to X11 output. The X11 output results will also depend on
the resolution of your screen.

The bottom line is that a user should not be surprised by what he gets
when it comes to linewidths - it definitely depends on the output


On Tue, 7 Mar 2006 wrote:

> Hi.
> a short question, how come my x11 and pdf display look different? I try to
> do a block diagram imposing polygons on a plot. It looks fine on x11, but
> some extra lines appears on my pdf files.
> thank you
> _______________________________________________
> ncl-talk mailing list

ncl-talk mailing list

Received on Thu Mar 09 2006 - 22:36:00 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 09 2006 - 22:39:16 MST