comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » A whine about default device settings
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
A whine about default device settings [message #58641] Sat, 09 February 2008 13:42 Go to next message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
The new 24-bit Z-buffer device is nice for generating graphics on a
device without a display, as is common with servers, for example. It is
easier to configure and use than Xvfb, for example.

Unfortunately, some of the default device settings are different between
the Z-buffer device and the X-Windows device. (I haven't checked the
WIN device because I don't have a Windows machine).

IDL> window, xsize=1024, ysize=768
IDL> help, !d, /str
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'X'
X_CH_SIZE LONG 6
Y_CH_SIZE LONG 10
IDL> set_plot, 'z'
IDL> device, set_resolution = [1024, 768], set_pixel_depth = 24
IDL> help, !d, /str
** Structure !DEVICE, 17 tags, length=84, data length=84:
NAME STRING 'Z'
X_CH_SIZE LONG 8
Y_CH_SIZE LONG 12

Because IDL scales margins and plot sizes based on the character size,
switching devices means that the resulting graphs are not identical,
despite identical window/device sizes.

This can be rectified by setting the character size of the Z-buffer
device with

DEVICE, SET_CHARACTER_SIZE = [6, 10]

or doing the reverse for the X-Windows device, but this seems to me to
be a pointless and unnecessary device dependence.

I am annoyed enough to post about this because I just spend longer than
I should have figuring out why the graphics output from the two devices
was not identical.

Ken Bowman
Re: A whine about default device settings [message #58708 is a reply to message #58641] Tue, 12 February 2008 07:24 Go to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Feb 11, 1:34 pm, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> Oh good, the X, Z, and WIN devices all have different default character
> sizes and pixels per centimeter.

You can't get that sort of consistency without years of development
and growth! On the positive side, knowing about this helps immensely
- I thought I was just misunderstanding something basic. Which I was,
but at least I'm not alone. Reminds me of the rounding errors that
change the slopes of plotted lines.

Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Grid Transformation to a new grid
Next Topic: Re: IDL batchfile as a linux script?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:13:58 PDT 2025

Total time taken to generate the page: 0.00645 seconds