Re: Postscript in IDL .. [message #25250] |
Fri, 01 June 2001 11:30 |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
"R.Aspey" <raspey@liv.ac.uk> writes:
> I am looking at using IDL to publish some pictures in a
> TeX document. Lets say I have data sets in either
> CSV or tab delimited.
>
> Can I produce postscript oe EPS files directly and
> if so does anyone have a srcipt they could send me
> with most of the stuff in to save me having to read manuals..
>
> What is the default data file format used for ascii import using IDL?
>
> A few things but I dont really want to spend my life
> learning things I may only use once every now and then
>
> Any comments would be very much appreciated.
>
> regards
> R.A.
> raspey@liv.ac.uk
>
On my browsable library catalogue http://www.mpimet.mpg.de/~schultz.martin/idl
you will find several tools for reading ASCII files and also some for postscript
output. Producing postscript in IDL is very easy, but can also become quite
tricky. It's easy as long as you don't care too much about landscape vs.
portrait and where your bounding box sits. But if you want to control these
things, it might take a good part of your life ;-( I'd recommend David's
fsc_psconfig program -- I still can't understand that he is so shy in
advertising it. .. OK, there have been a few bugs in the past, but I am
convinced they are fixed now.
Cheers,
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|
Re: Postscript in IDL .. [message #25254 is a reply to message #25250] |
Fri, 01 June 2001 06:49  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Dear R.A.
"R.Aspey" wrote:
>
> I am looking at using IDL to publish some pictures in a
> TeX document. Lets say I have data sets in either
> CSV or tab delimited.
You may use our read_data_file,
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/read_data_file.tar.gz
This routine reads directly a whole datafile into a structure.
You have only to select the filename.
Restriction:
data is a tabular without text
For licensing please have a look at
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
>
> Can I produce postscript oe EPS files directly and
> if so does anyone have a srcipt they could send me
> with most of the stuff in to save me having to read manuals..
Yes!
To get a very good output as EPS or PS or on Screen we have
developed a plot environment
I have written a publication with lots of examples to explain this in
more detail.
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
PRO example
D=read_data_file('file.txt')
x=(d.data[0,*])[*]
y1=(d.data[1,*])[*]
plotprepare,plot
plot.stamp=0
plot.psflag=2
plot.psfile='example'
plotinit,plot
plotxy,plot,x=x,y=y1
plotend,plot
END
With the plot.psflag you can switch between different output devices
for example
0 is output on screen
1 is PS
2 is EPS
and some others
the plotxy handles the thickness of lines, charsize and symbols,
page layout and positions for all different outputs.
So you get on each device a very good result.
The package includes XY, error bars, probability, 2D, XY_2D, Maps and 3D
at the moment.
>
> What is the default data file format used for ascii import using IDL?
there is no default, but it's alway good not mixing text and numbers
in a table.
>
> A few things but I dont really want to spend my life
> learning things I may only use once every now and then
How old are you ?
>
> Any comments would be very much appreciated.
>
> regards
> R.A.
> raspey@liv.ac.uk
cia
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
=============================================
a IDL library at ForschungsZentrum J�lich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
|
|
|
Re: Postscript in IDL .. [message #25255 is a reply to message #25254] |
Fri, 01 June 2001 06:30  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
R.Aspey (raspey@liv.ac.uk) writes:
> I am looking at using IDL to publish some pictures in a
> TeX document. Lets say I have data sets in either
> CSV or tab delimited.
>
> Can I produce postscript oe EPS files directly and
> if so does anyone have a srcipt they could send me
> with most of the stuff in to save me having to read manuals..
>
> What is the default data file format used for ascii import using IDL?
>
> A few things but I dont really want to spend my life
> learning things I may only use once every now and then
>
> Any comments would be very much appreciated.
I think you need to pay a competent professional to handle
this for you. But it wouldn't be easy. The documentation
is awful, and they would have to plow through it, too.
Still, I can't imagine tab delimited data taking more than
2-3 minutes. The PostScript output is probably another 30
seconds. You might have to pay as much as $5-$10 to get
this handled. :-(
How about something like this:
data = FltArr(ofWhatEverSize)
OpenR, lun, 'mydatafile.txt', /Get_Lun
ReadF, lun, data
Free_Lun, lun
thisDevice = !P.Name
Set_Plot, "PS"
Device, /Encapsulated
Plot, data
Device, /Close
Set_Plot, thisDevice
It can be fancier than that. But that's about it.
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
|
|
|