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

Home » Public Forums » archive » log scale colorbar in IDL 8.0
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: log scale colorbar in IDL 8.0 [message #76198 is a reply to message #76113] Thu, 19 May 2011 12:36 Go to previous messageGo to previous message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
On May 19, 12:53 pm, David Fanning <n...@idlcoyote.com> wrote:
> David Fanning writes:
>
>> Paolo writes:
>
>>> By the way, the cg version doesn't seem to be properly
>>> honoring the axis ranges. For instance, a y range of
>>> [-100,100] should show an image only in the upper half
>>> of the axis, as the image y-range is only [0,127]...
>
>>> (well one could wonder why would you plot that way...
>>> but the idea behind pg_plotimage was to plot an image the
>>> same way you would use "plot"...)
>
>> Hi Paolo,
>
>> I have no trouble fixing this for the display, but
>> I can't make it write a proper PostScript file. I've
>> gone back to the original code, and I can't make that
>> program write a proper PostScript file with this command
>> either! Have you ever tried to write a PostScript file
>> with the commands above in your original program? :-)
>
> Here is the code I am using with your original program.
>
>   loadct,5
>   im=dist(128,128)
>   x=findgen(128)
>   y=findgen(128)
>   ps_start, filename='test_1.ps'
>   pg_plotimage,im,x,y,xrange=[5,100],$
>     yrange=[5,100],/xstyle,/ystyle,/xlog
>   ps_end
>   ps_start, filename='test_2.ps'
>   pg_plotimage,im,x,y,xrange=[5,100],$
>      yrange=[-100,100],/xstyle,/ystyle,/xlog
>   ps_end
>   END
>
> test_1.ps seems to be fine. But test_2.ps is
> buggered. :-)

It turns out it was a simple (i.e. stupid) bug
with two indices that were 0 and should have
been 1.

Since it turns out I let my password expire I can't
update the version on the CfA webpage right now,
but you can find the fixed version on:

http://www.grigis.ch/pg_plotimage.pro

Or manually fix the indices from 0 to 1 at the end of lines
249 and 252.

Ciao,
Paolo

>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.idlcoyote.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to run a program in a loop or batch mode
Next Topic: cgsnapshot-->dialog_pickfile:Bad initial filename

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

Current Time: Wed Oct 08 17:28:27 PDT 2025

Total time taken to generate the page: 0.00453 seconds