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

Home » Public Forums » archive » Coyote Library Updated
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Coyote Library Updated [message #87184] Tue, 14 January 2014 14:34 Go to next message
David Fanning is currently offline  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 #87190 is a reply to message #87184] Wed, 15 January 2014 01:53 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
Hi David,

On 14.01.2014 23:34, David Fanning wrote:
> It is simpler now
> and involves a second ImageMagick command.

thanks for the news. 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).


Thanks!

Fab
Re: Coyote Library Updated [message #87191 is a reply to message #87184] Wed, 15 January 2014 04:55 Go to previous messageGo to next message
Haje Korth is currently offline  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 #87195 is a reply to message #87191] Wed, 15 January 2014 05:37 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Haje Korth writes:

> could you check the link for the zip file? I get an error clicking the link.

Oh, sorry:

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.")
Re: Coyote Library Updated [message #87198 is a reply to message #87190] Wed, 15 January 2014 05:47 Go to previous messageGo to next message
David Fanning is currently offline  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).

I haven't timed it. I presume it is marginally slower since the file has
to be written to disk twice. It certainly isn't slow enough to bother me
yet. On the other hand, having to open Photoshop or Hypersnap or some
other piece of software to resize gigantic PNG files really gets my
blood boiling. :-)

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 #87199 is a reply to message #87195] Wed, 15 January 2014 07:33 Go to previous messageGo to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Thank you, David! Haje

On Wednesday, January 15, 2014 8:37:34 AM UTC-5, David Fanning wrote:
> Haje Korth writes:
>
>
>
>> could you check the link for the zip file? I get an error clicking the link.
>
>
>
> Oh, sorry:
>
>
>
> 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.")
Re: Coyote Library Updated [message #87201 is a reply to message #87190] Wed, 15 January 2014 08:17 Go to previous message
David Fanning is currently offline  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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Is the sky falling?
Next Topic: plot filled circles

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

Current Time: Wed Oct 08 09:11:47 PDT 2025

Total time taken to generate the page: 0.00658 seconds