Re: plotting and large data files [message #13253] |
Thu, 29 October 1998 00:00 |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
David Ritscher wrote:
> How does one handle plotting of data sets with many more points than
> one can plot on the screen or print on a laser printer?
>
> [Explanation cut]
> Finally, now, my questions:
>
> 1. Is there any way to do something similar with a laser printer?
> Different laser printers have different mappings of pixels, sometimes
> even different mappings in the two directions (for example, higher
> resolution in the long axis of the paper). How would I perform the
> above steps 1. and 2. with a laser printer?
>
The !D.X_SIZE and !D.Y_SIZE values tell you how many pixels you have
available for the
current device (and !D.X_VSIZE, !D.Y_VSIZE give you the size of the visible
area). Although I
am not exactly sure of this, I think this corresponds to the resolution
that IDL is actually
using for the plot (in which case it would not help you if you rprinter
renders 300 dpi, 600 dpi
or even more).
Here is a sample output:
IDL> set_plot,'X'
IDL> print,!d.x_size,!d.y_size
640 512
IDL> set_plot,'ps'
IDL> print,!d.x_size,!d.y_size
17780 12700
You can influence the values of !D.X_SIZE and !D.Y_SIZE by specifying
DEVICE,XSIZE=something. Example:
IDL> set_plot,'ps'
IDL> device,xsize=40
IDL> print,!d.x_size
40000
However, this changes the page size that IDL assumes, and you woul
dprobably have to find some way of reducing your
final "image" size lateron.
Wishing I was wrong ;-)
Martin.
> 2. Would other users find this capability a useful thing to add to IDL
> and PV-Wave basic functionality? As an alternative to the Nsum
> keyword, the keyword control I would want would be to have the raw
> data automatically downsamples the correct amount to correspond to the
> actual pixels, and with a capability of controlling how this
> downsampling is done:
> * averaging
>
That's done with NSUM as I understand
> * sampling (i.e., take first sample of each of the raw data sequences)
That's easy:
index = lindgen(fix(n_elements(DATA)/INTERVAL))*10
plot,data[index]
>
> * min and max (plot a high and low for each column, as above)
>
This may be useful, although I have never experienced the need for this so
far. BUT: if the output
resolution is really as limited as I mention above, this should not be a
keyword but a general feature!
There is absolutely no need to store more information than can be used by
the output device.
> * user-defined function
>
Maybe asking a little too much here...
>
> David Ritscher
> --
> Cardiac Rhythm Management Laboratory
> Department of Medicine
> University of Alabama at Birmingham
> B168 Volker Hall - 1670 University Boulevard
> Birmingham AL 35294-0019
> Tel: (205) 975-2122 Fax: (205) 975-4720
> Email: david.ritscher@bigfoot.com
--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Engineering&Applied Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA
phone: (617)-496-8318
fax : (617)-495-4551
e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------
|
|
|
Re: plotting and large data files [message #13256 is a reply to message #13253] |
Thu, 29 October 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Note: A copy of this article was e-mailed to the original poster.
David Ritscher (david.ritscher@bigfoot.com) writes:
> How does one handle plotting of data sets with many more points than
> one can plot on the screen or print on a laser printer?
> [Nice solution snipped.]
> 1. Is there any way to do something similar with a laser printer?
> Different laser printers have different mappings of pixels, sometimes
> even different mappings in the two directions (for example, higher
> resolution in the long axis of the paper). How would I perform the
> above steps 1. and 2. with a laser printer?
At least for the PRINTER device in IDL you can (in IDL 5.1.1
and higher) get the pixel resolution of the default printer
with the GET_PAGE_SIZE keyword to the DEVICE command:
Set_Plot, 'PRINTER'
DEVICE, GET_PAGE_SIZE=thisPage
Print, thisPage
Presumably with this information you can perform the
same tedious tasks you are now performing for the display
device.
I agree it would be nice to have this functionality built
into IDL.
Cheers,
David
----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|