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

Home » Public Forums » archive » A line command for printing graphs.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
A line command for printing graphs. [message #16481] Thu, 29 July 1999 00:00
Andry William Ratsima is currently offline  Andry William Ratsima
Messages: 4
Registered: August 1997
Junior Member
Dear IDL users,

I have written a pretty simple IDL procedure which had helped me in
printing graphs on a PS file. The idea is that with this program I
can easily define sizes. This procedure lets print almost any plot
from a main program or a procedure without the need to change the
program and include a "set_plot, 'ps'" command.

I have put the program on my web server because I think it can be
usefull for anybody, especially for beginners.
( http://www.ccbb.ulpgc.es/fisica/usuarios/andry/IDL/pr_print. pro)

Also, I would appreciate if anybody can improve it and send me back
any suggestion or any improvement he has.

For example one thing I would to have is creating a simple widget
interface which can be used to run the procedure. I am not very good
in widget so that why I would need somebody.

Thanks for your input and looking forward to hearing your comments

Regards,

NOTE: Please find below the "help" I wrote for the program.

--
============================================================ =======
Andry William Ratsimandresy tel:34-928454520
Grupo de Oceanografia Fisica, Dpto. de Fisica fax:34-928452922
Universidad de Las Palmas de G.C. e-mail:andry@fisica.ulpgc.es
35017 Las Palmas de Gran Canaria Espana

http://www.ccbb.ulpgc.es/fisica/usuarios/andry/
============================================================ =======


========================BEGIN HELP=================================
;+
; NAME:
; PR_PRINT
;
; PURPOSE:
; By running this procedure to call another specified procedure
(the
; real program to run), you will be able to choose after seen the
; plotting graphics whether you want to print it or not.
;
; CATEGORY:
; program handling, output.
;
; CALLING SEQUENCE:
; pr_print
;
; OPTIONAL INPUT PARAMETERS:
; prnt: The size scale. It is defined as:
; x-size
; prnt= ------
; y-size
; Sometimes, this parameter is computed within the main
; program (especially for a map plot).
; If not set manually nor within the main program, a value
; of
; PRNT=0.75
; is used.
; The value introduced at the execution of this PR_PRINT
; program will override any computed value.
;
; sz: A 2-element vector which specifies the X- and Y-size of
; the hardcopy graphic (!!!! in PS mode !!!)
;
; fichero: A short cut by specifying at execution time the
name of
; the file of the program to plot.
;
; KEYWORD:
; landscape: If set and not equal to 0, generates a graphic
in
; a landscape mode.
;
; w_device: The output device used to show the plot. If not
; specified, the plot will be first shown on the screen.
;
; xxx_comp: set this keyword to 1 if you know that it is not
; the 1st time you use this 'pr_print' program during the
; session.
; no_plot: Set this to 1 if you do not want to plot the
graphs before
; printing it. This is useful when your program needs a
lot of time
; to run, you are already sure of your result, and you
want to plot
; it right away.
; compile: Set this to 1 if you do need to compile the
procedure.
; The compilation should be done whenever you change to a
new
; procedure (or have made a change to the procedure) and
you have
; already used "pr_print" during your session.
; out_flnm: Set this to the name of the output filename. If
not set the
; default is the name of the program to be run with the
specific
; extension. ; *****************THALASSA
; color: Set this to 1 to save color postscript file. ;;COLOR
; xoffset: Set this to the offset distance in X (in Cm). If not
set the
; default is drawing the graph in the center of the paper.
; yoffset: Set this to the offset distance in Y (in Cm). If not
set the
; default is drawing the graph in the center of the paper.
;
; RESTRICTIONS:
; Main programs (not carrying the leading line:
; pro fichero
; can be run. Another copy of the program is made converted into
; procedure. The later is run and deleted after execution.
; You should have some free memory on your drive for the temporary
; copy to be run.
;
; The program to run should have the following first executable
; line:
; pro fichero,prnt=prnt
; If not, the optional keyword ",prnt=prnt" is added to the
; "pro fichero"-line.
;
; Main programs which contain Procedure(s) and/or Fuction(s) at
the
; begining of the main file are not supported.
;
; << WARNING !!!>>
; << WARNING !!!>> IF YOU WANT TO SPECIFY THE SIZE OF YOUR GRAPH,
; << WARNING !!!>> DON'T FORGET TO DEFINE prnt IN YOUR MAIN
; << WARNING !!!>> PROGRAM.
; << WARNING !!!>>
;
; RESULT:
; The program will plot the graphic on the current device.
;
; MODIFICATION:
; 990520, allow user to specify xoffset/yoffset.
; 981008, corrected the change of background color.
; 980520, by WAR, Add "color" keyword.
; 980505, add "out_flnm" keyword.
; Feb. 16th, 1998, rename "landscp" keyword => "landscape".
; Jan. 9th, 1998, add "compile" keyword for IDL V 5.0
; Dec. 20th, 1997, Add "no_plot" keyword.
; Oct. 30th, 1997, Correct bug about "PRO..." filename.
; Sept. 23rd, 1995, created by WAR.
; Oct. 15th, !version.os introduced
; Jan 1st, 1996, w_device, landscp, prnt, and sz keywords
introduced.
; Jan 7th, 1996, Main plotting prog (which does not carry a
; leading line "pro fichero") can be run.
; Feb 29th, 1996, add 'xxx_comp' keyword so that one can
re-compile
; the new-to-plot program.
;
;
-------.---------.---------.---------.-------.-----------.-- -----
;
; THIS PROGRAM WORKS PRETTY FINE BUT NEEDS ANYBODY'S INPUT FOR
; IMPROVEMENT AND FOR EXAMPLE, FOR MAKING A widget INTERFACE FOR
; END USERS.
; IT STILL NEEDS SOME IMPROVEMENT SUCH AS ACCPETING ALL THE
GRAPHIC
; KEYWORD FOR device AND call_procedure.
;
;-
[Message index]
 
Read Message
Previous Topic: Re: Q: interfacing IDL to DLL
Next Topic: Re: wait for an available license?

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

Current Time: Sat Oct 11 14:34:14 PDT 2025

Total time taken to generate the page: 1.52058 seconds