Coyote Library Updated [message #87184] |
Tue, 14 January 2014 14:34  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I updated several programs in the Coyote Library today to make it easier
to compare output between Coyote Graphics routines and function graphics
routines. Mostly this included changing the default font size very
slightly in Coyote Graphics (when in PostScript) to match the function
graphics font size. I also changed the algorithm I was using in
cgPS2Raster to one that works correctly in all cases. It is simpler now
and involves a second ImageMagick command. Doing it this way makes it
much easier to create properly sized raster files from the encapsulated
PostScript files created by function graphics routines. (Well, it would
have, had the function graphics PostScript files not had bugs in them.
I've since learned these have been corrected in IDL 8.3.) Just be sure
to set the Portrait keyword (all encapsulated PostScript files are in
portrait orientation) when you are using cgPS2Raster with PostScript
files created with function graphics routines.
window.save, 'myfile.ps'
cgPS2Raster, 'myfile.ps', /PNG, Width=600, /Portrait
You can find updated Coyote Library files here:
http://www.idlcoyote.com/zip_files/coyoteprograms.zip
GoogleCode, as of today, is no longer allowing downloads of zip files,
so you can always find the latest files at the above location. They are
also available in the Coyote Store as a free software download:
http://www.idlcoyote.com/coyotestore/
If you have an SVN client, you can continue to get Coyote Library
routines from the GoogleCode repository. I continue to use this as the
source of all my library routines.
If you want to see an example of Coyote Graphics verses Function
Graphics output, download the new Library and then visit the multiple
axes plot example in the Coyote Plot Gallery:
http://www.idlcoyote.com/gallery/index.html#ADDITIONAL_AXES_ PLOT
If anyone wants to contribute function graphics code to the plot
gallery, please have at it. I'll do this as I can, but it is not my
highest priority.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
Re: Coyote Library Updated [message #87191 is a reply to message #87184] |
Wed, 15 January 2014 04:55   |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Hi David,
could you check the link for the zip file? I get an error clicking the link.
Thank you,
Haje
On Tuesday, January 14, 2014 5:34:36 PM UTC-5, David Fanning wrote:
> Folks,
>
>
>
> I updated several programs in the Coyote Library today to make it easier
>
> to compare output between Coyote Graphics routines and function graphics
>
> routines. Mostly this included changing the default font size very
>
> slightly in Coyote Graphics (when in PostScript) to match the function
>
> graphics font size. I also changed the algorithm I was using in
>
> cgPS2Raster to one that works correctly in all cases. It is simpler now
>
> and involves a second ImageMagick command. Doing it this way makes it
>
> much easier to create properly sized raster files from the encapsulated
>
> PostScript files created by function graphics routines. (Well, it would
>
> have, had the function graphics PostScript files not had bugs in them.
>
> I've since learned these have been corrected in IDL 8.3.) Just be sure
>
> to set the Portrait keyword (all encapsulated PostScript files are in
>
> portrait orientation) when you are using cgPS2Raster with PostScript
>
> files created with function graphics routines.
>
>
>
> window.save, 'myfile.ps'
>
> cgPS2Raster, 'myfile.ps', /PNG, Width=600, /Portrait
>
>
>
> You can find updated Coyote Library files here:
>
>
>
> http://www.idlcoyote.com/zip_files/coyoteprograms.zip
>
>
>
> GoogleCode, as of today, is no longer allowing downloads of zip files,
>
> so you can always find the latest files at the above location. They are
>
> also available in the Coyote Store as a free software download:
>
>
>
> http://www.idlcoyote.com/coyotestore/
>
>
>
> If you have an SVN client, you can continue to get Coyote Library
>
> routines from the GoogleCode repository. I continue to use this as the
>
> source of all my library routines.
>
>
>
> If you want to see an example of Coyote Graphics verses Function
>
> Graphics output, download the new Library and then visit the multiple
>
> axes plot example in the Coyote Plot Gallery:
>
>
>
> http://www.idlcoyote.com/gallery/index.html#ADDITIONAL_AXES_ PLOT
>
>
>
> If anyone wants to contribute function graphics code to the plot
>
> gallery, please have at it. I'll do this as I can, but it is not my
>
> highest priority.
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
|
|
Re: Coyote Library Updated [message #87201 is a reply to message #87190] |
Wed, 15 January 2014 08:17  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Fabien writes:
> Does that mean that producing raster output is
> slower than before? I always felt that producing raster images out of
> the EPS plots was quite slow (I know this has nothing to do with coyote
> but with imagemagick).
OK, this was much slower (2.25 seconds verses about 1.35 seconds). The
huge advantage of the two-command solution is that I could easily get
the dimensions of the image, which is required if I want to use the
HEIGHT keyword in addition to the WIDTH.
So, in order to do this correctly, I need the dimensions of the
PostScript file. These are available in the Bounding Box values that are
written into every PostScript file, as far as I know. Anyway, I had to
write a program, cgPSDims, to get these values so I can do the resizing
correctly when the HEIGHT keyword is used.
I think it is all working correctly now. Some sampling timings:
No resizing at all. 1.85 sec.
Normal resizing to 25%: 1.36
Resizing with WIDTH keyword: 1.32
Resizing with HEIGHT keyword: 1.33
Incidentally, I forgot to mention this yesterday. I also added an
IM_COMMAND keyword to cgPS2Raster that will return the exact ImageMagick
command I use for creating the raster file. If the keyword is used, the
command is returned, but the SPAWN of the command doesn't happen. I
thought this might help the Mac guys who for God only knows what reason
can't spawn ImageMagick commands, although the same command works
perfectly at the UNIX command line.
Coyote Library here:
http://www.idlcoyote.com/programs/zip_files/coyoteprograms.z ip
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|