| Re: Page Size of HP-GL Device [message #18351] |
Tue, 21 December 1999 00:00 |
Michael Asten
Messages: 53 Registered: March 1999
|
Member |
|
|
You dont say whether you are printing via a windows driver or direct in HPGL.
There is a trap for the unwary (ie undocumented feature) if plotting via a windows
driver, in IDL5.2 or above. I have encountered a similar problem plotting to
A4,A3 printers and to a HP650 plotter (36 inch wide) in idl5.2, via Win95 and
windows driver.
A note posted a month ago refers.
Before posting this, I have justed sighted DWFs comment. Seems to tickle a memory
cell that the HP650 plotter measures offsets from (0,0) at page centre, so a
default (0,0) offset would give the problem you mention. By contrast, A4 and A3
plotter measure offsets from bottom left.
Regards,
Michael Asten
Michael Lefsky wrote:
> I am trying to plot IDL generated graphs on our 36" wide HP plotter. I set the
> X_size to 91 cm (36") but when the plots come out, the left hand side of the
> graphs start at the middle of the page, and continue off the right hand side
> of the page. Has anyone come across this problem, and hopefully, solved it?
>
> Michael Lefsky
Copied from 19 Nov 99
Osamu Sasaki wrote:
> Hi,
>
> This is a simple printing program.
>
> PRO TEST
> save = !D.NAME
> SET_PLOT, 'PRINTER'
>
> ret = DIALOG_PRINTERSETUP()
>
> HELP, /DEVICE
> PLOT, INDGEN(10)
> DEVICE, /CLOSE_DOCUMENT
>
> SET_PLOT, save
> END
>
> Run this program on IDL 5.2 (Windows).
> Select PostScript printer(output device),
> A3(media), landscape(orientation) and press OK.
>
> The output is like this.
>
> +------------+
> | |
> | |
> | ###### |
> | ###### |
> +------------+
>
> (# is plotted area)
>
> It should be like this.
>
> +------------+
> | ########## |
> | ########## |
> | ########## |
> | ########## |
> +------------+
>
> And it works correctly with other printers (LIPS, ESC/Page, PCL, etc.).
>
> Why only PostScript printers ?
> Is there any way to solve this problem ?
>
Im not a postscript user, but I had a similar offset problem on direct
printing to windows printers when upgrading from idl5.1 (gave correct
positioning) to idl5.2 (did not give correct positioning).
It turns out that idl 5.2 introduced a default clip area on the page. I
recall a comment from RSI that the change also related to postscript plots,
so it is possible your problem is similar to mine.
In order to use the full A3 page on my printer (an HP1000C) I have to use
the following:
set_plot, "printer",/copy
r=dialog_printersetup()
; Get the page size (dependent upon page type selected from the dialog).
DEVICE, GET_PAGE_SIZE=pageSize ; this is a secret command, not in
documentation !!
; Set the drawing area based on that page size.
DEVICE, XOFFSET=0, YOFFSET=0, XSIZE=pageSize[0],
YSIZE=pageSize[1],/DEVICE
; Note that the DEVICE keyword is required for that last call (since
; pageSize is measured in pixels).
;Note also that you may want to use only a portion of the overall page
; size. In this case, you can apply a proportional scale to the
queried page
; size (and adjust the xoffset and yoffset as you wish).
Does this help?
Regards,
Michael Asten
|
|
|
|
| Re: Page Size of HP-GL Device [message #18354 is a reply to message #18351] |
Mon, 20 December 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Michael Lefsky (lefsky@fsl.orst.edu) writes:
> I think so- I set them to 0 to check and it didn't change the result.
I don't have any experience at all with the HPGL device,
but you have to be just a bit careful with offsets. In
PostScript, if you select Landscape mode and set the
Offsets to 0 your graphic would be off the PostScript
page and you would be staring at quite a few blank sheets
of paper coming off your printer before you figured it
out, probably. :-(
Try entering IDL fresh and then find out how IDL
normally does things:
IDL> Set_Plot, 'HP'
IDL> Help, /Device
IDL> Device, /Landscape
IDL> Help, /Device
This will give you some insight into how things work.
For example, in PostScript you would find that the
YOFFSET points in the negative X direction and the
XOFFSET points in the positive Y direction. *That's*
worth knowing!
Anyway, armed with some information you can start
fooling around a bit. I wouldn't make offsets 0,
usually, since I don't think devices can write
right to the edge of the page. Who knows what they
might do if you tried?
Sorry I can't offer more specific help.
Best Regards,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|
| Re: Page Size of HP-GL Device [message #18355 is a reply to message #18354] |
Mon, 20 December 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Michael Lefsky (lefsky@fsl.orst.edu) writes:
> I am trying to plot IDL generated graphs on our 36" wide HP plotter. I set the
> X_size to 91 cm (36") but when the plots come out, the left hand side of the
> graphs start at the middle of the page, and continue off the right hand side
> of the page. Has anyone come across this problem, and hopefully, solved it?
I presume you are setting the offsets appropriately?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|
| Re: Page Size of HP-GL Device [message #18356 is a reply to message #18354] |
Mon, 20 December 1999 00:00  |
Michael Lefsky
Messages: 9 Registered: October 1999
|
Junior Member |
|
|
David,
I think so- I set them to 0 to check and it didn't change the result.
David Fanning wrote:
>
> Michael Lefsky (lefsky@fsl.orst.edu) writes:
>
>> I am trying to plot IDL generated graphs on our 36" wide HP plotter. I set the
>> X_size to 91 cm (36") but when the plots come out, the left hand side of the
>> graphs start at the middle of the page, and continue off the right hand side
>> of the page. Has anyone come across this problem, and hopefully, solved it?
>
> I presume you are setting the offsets appropriately?
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|