Re: Resolution [message #27626] |
Tue, 30 October 2001 15:16 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark Hadfield (m.hadfield@niwa.cri.nz) writes:
> Cool program, David. What's the significance of the prefix? I can see what
> "FSC_" stands for but not "MPI_". Did you just add it to irritate JD?
It occurred to me. :-)
But MPI stands for Max-Planck Institute, the lovely
people who funded the development of that program,
and offered to let me make it available to people
free of charge.
Cheers,
David
P.S. Let's just say I'm renting naming rights to
the first three letters of other programs
currently. Grab your checkbook and give me a call. :-)
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Resolution [message #27627 is a reply to message #27626] |
Tue, 30 October 2001 15:01  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
From: "JD Smith" <jdsmith@astro.cornell.edu>
> Mark Hadfield wrote:
>
>> Cool program, David. What's the significance of the prefix?
>> I can see what "FSC_" stands for but not "MPI_". Did you
>> just add it to irritate JD?
>
> Perhaps you could mark it indelibly by rewriting it as
> "mgh_mpi_plot". Ahh, the rich history of territoriality.
> Something even my dog understands ;)
One of the nice things about consistently-applied prefixes is that it is
easy to find and remove them using a global search & replace. I wish I could
say the same about dog-pee stains on the carpet.
---
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
|
|
|
Re: Resolution [message #27628 is a reply to message #27627] |
Tue, 30 October 2001 14:55  |
John-David T. Smith
Messages: 384 Registered: January 2000
|
Senior Member |
|
|
Mark Hadfield wrote:
> Cool program, David. What's the significance of the prefix? I can see what
> "FSC_" stands for but not "MPI_". Did you just add it to irritate JD?
Perhaps you could mark it indelibly by rewriting it as "mgh_mpi_plot".
Ahh, the rich history of territoriality. Something even my dog
understands ;)
JD
|
|
|
|
Re: Resolution [message #27635 is a reply to message #27630] |
Tue, 30 October 2001 07:55  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
JD Smith (jdsmith@astro.cornell.edu) writes:
> And if *I* were a beginner, I would expect that you could specify sizes
> for plot symbols in physical pixel units if you wanted, and that at
> least a given symbol of a given size would occupy a fixed number of
> pixels from one platform to the next. I would sure be one disappointed
> beginner, though, especially if I had learned from some higher power how
> to summon the powers of "device,copy" to erase areas of windows for
> dynamic re-drawing.
Even experts have to work with the tools that are
in their shop. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Resolution [message #27636 is a reply to message #27635] |
Tue, 30 October 2001 07:48  |
John-David T. Smith
Messages: 384 Registered: January 2000
|
Senior Member |
|
|
David Fanning wrote:
>
> Luca Delle Monache (monache@met.sjsu.edu) 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?
>
> You have been getting some good advice, but I have
> to admit I don't even understand some of it, and I've
> been around for awhile. :-)
>
> If *I* were a beginner, and I wanted to make a really
> nice looking plot without having to know much about
> anything (and in particular, how IDL really works!),
> I grab the MPI_PLOT program and pass my data to that.
> There are so many options there (including all manner
> of output options) that you can get to just by pointing
> and clicking, that even a beginner can get a great looking
> plot in a couple of minutes. For higher resolution, just
> make the window bigger. :-)
And if *I* were a beginner, I would expect that you could specify sizes
for plot symbols in physical pixel units if you wanted, and that at
least a given symbol of a given size would occupy a fixed number of
pixels from one platform to the next. I would sure be one disappointed
beginner, though, especially if I had learned from some higher power how
to summon the powers of "device,copy" to erase areas of windows for
dynamic re-drawing.
JD
|
|
|
Re: Resolution [message #27646 is a reply to message #27636] |
Mon, 29 October 2001 20:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Luca Delle Monache (monache@met.sjsu.edu) 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?
You have been getting some good advice, but I have
to admit I don't even understand some of it, and I've
been around for awhile. :-)
If *I* were a beginner, and I wanted to make a really
nice looking plot without having to know much about
anything (and in particular, how IDL really works!),
I grab the MPI_PLOT program and pass my data to that.
There are so many options there (including all manner
of output options) that you can get to just by pointing
and clicking, that even a beginner can get a great looking
plot in a couple of minutes. For higher resolution, just
make the window bigger. :-)
http://www.dfanning.com/programs/mpi_plot.zip
Use it like this:
IDL> MPI_Plot, mydata
It is a wrapper for the PLOT command (and much more).
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
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
|
|
|
Re: Resolution [message #27648 is a reply to message #27647] |
Mon, 29 October 2001 19:53  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
monache@met.sjsu.edu (Luca Delle Monache) writes:
> Hi there,
>
> 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.
Good luck!
Craig
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
|
|
|