Re: Resolution [message #27647 is a reply to message #27646] |
Mon, 29 October 2001 20:27   |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
From: "Craig Markwardt" <craigmnet@cow.physics.wisc.edu>
> monache@met.sjsu.edu (Luca Delle Monache) writes:
>
>> I'm a beginer, so, sorry if the question is a low level question.
>>
>> I'm plotting an array using psym = 6 (square).
>> On my scree, the squares do not look all the same! Also, printing a
>> PNG file built with WRITE_PNG, I see the same problem.
>>
>> How I can avoid that problem? I mean, how I can create a better
>> quality plot in PNG format?
>
> I believe the answer to your question is that your plotting symbol is
> actually not an integer number of pixels wide. Therefore, depending
> on where the symbol appears in the data viewport, it might consume N
> or N+1 real pixels, depending on the rounding error at that particular
> position.
>
> The easiest solution is to give your plot more resolution. This can
> be accomplished by making the plot window bigger (more pixels per
> plot), or by outputting to postscript (which has effectively infinite
> resolution). Beyond that you could probably build your own symbol as
> a bitmap and then use TV to put it on screen, but this might get ugly
> with data-to-device coordinate conversions.
I think your diagnosis and cure are *almost* correct, Craig, but even if the
symbol size were an integral number of pixels, the symbol appearance would
vary with the position of the symbol centre relative to the pixels. So what
about tweaking the data so that each symbol is centred on a pixel? (This
would also get ugly with data-to-device coordinate conversions.)
Filled symbols or symbols with thicker lines might also look better. Or
perhaps we can wait for JD to implement anti-aliased symbols...
However, I don't know if any of this is good advice for a beginner. If you
want clean-looking plots, Luca, then you should definitely look at using a
vector format (like Postscript, as Craig suggested) instead of an image
format.
---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research
--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
|
|
|