Re: Object Graphics fonts [message #39681 is a reply to message #39240] |
Mon, 07 June 2004 12:56   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Michael Wallace writes:
> Okay, time for another question from the Object Graphics novice. I have
> managed to create some simple 2D histograms which look pretty good,
> except I'm not too pleased with the fonts.
>
> First, how do I change the fonts of the labels on an axis? I can easily
> change the font of the text annotation for the axis, but I can't seem to
> figure out how to easily change the actual labels.
Once you create the axis, you can use the GetProperty method
and the TickText keyword to get the text objects used to
create the axis annotations. You are free to manipulate these
text objects anyway you like. I'm sure you could rotate them
upside down and stand them on their heads, if you like. :-)
>
> Second, while fonts running horizontally look fine (mostly), fonts
> running vertically look like crap. Is there any way to make a vertical
> font, say for a Y axis annotation, look like the X axis equivalent but
> rotated? Even the horizontal fonts don't look that great if the font
> size is too small. Is there any way to remedy this?
Are you not using IDL 6.0? Fonts there look very nice.
I can see why you are complaining if you are using a
previous version of IDL. You can certainly rotate
Y axis fonts if that's what you want to do. All kinds of
text manipulation keywords are available. One usually
uses the "random change" method until you understand which
keywords to use and how.
> Thirdly, I thought I might do better by using PostScript.
What could possibly make you think that!?
PostScript is wonderful if you plan to print something.
But unless you have one of those antique Next computers,
there is absolutely no advantage to using PostScript for
anything else.
> This might be a dumb question, but if I were to generate a PostScript
> file and then use a utility such as the convert program, would the
> resulting bitmap (e.g. PNG, GIF) look better than the version IDL would
> create by using Write_PNG or Write_GIF with the data from the
> IDLgrWindow or IDLgrBuffer? I guess I could try this out and see if it
> looks any better, but I'd rather not figure out how to get PostScript to
> work if it doesn't make any improvement.
Don't waste your time. "Looking good" is a matter of how much
resolution you have. You computer has about 75 pixels per inch
PostScript has anywhere from 300-1200 pixels per inch. Nothing
you display on the computer is going to look as good as something
you print. End of story. :-)
(Of course you might have one of those 21 inch LCD flat-panel
monitors I've been drooling over lately. Images look pretty good
on *those*!)
>
> I guess I should have said this at the top, but my specific problem is
> that I need to create plots which will be viewable online and so need to
> be a GIF, PNG, JPEG or the like. Right now, my code is creating an
> IDLgrBuffer, drawing everything, reading the data from the buffer and
> sending it on to Write_PNG. It's working without any problem, but some
> fonts (vertical, small horizontal) are hard to read. I was hoping that
> I could either figure out a better way to handle the IDLgrFonts or save
> the files as something like EPS and then convert them.
Well, have you tried making your buffer bigger and Congriding it down
for the JPEGs? That might improve resolution some, especially if you
are using the older polygon fonts.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|