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

Home » Public Forums » archive » image function question
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
image function question [message #90208] Tue, 10 February 2015 17:53 Go to next message
Dae-Kyu Shin is currently offline  Dae-Kyu Shin
Messages: 25
Registered: February 2015
Junior Member
here is a example

data = DIST(500)
x = FINDGEN(500, start=1)
win = window()
win.refresh, /disable
i = image(data, x, x, /current, /axis)
win.save, 'test.png'

"test.png" file No image appears.!!(just axes)-> bug??




and question.

data = DIST(500)
x = FINDGEN(500, start=1)/5

c = contour(data, x, x, /ylog)
i = image(data, x, x, /ylog, /axis)

image function does not appear to ylog.(just yaxis value.....)
but contour function is OK.
Is that intended??



idl 8.4 and 8.3
Re: image function question [message #90211 is a reply to message #90208] Wed, 11 February 2015 02:33 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
the first is easy.
take away:
win.refresh, /disable

Cheers, Helder

On Wednesday, February 11, 2015 at 2:53:08 AM UTC+1, Dae-Kyu Shin wrote:
> here is a example
>
> data = DIST(500)
> x = FINDGEN(500, start=1)
> win = window()
> win.refresh, /disable
> i = image(data, x, x, /current, /axis)
> win.save, 'test.png'
>
> "test.png" file No image appears.!!(just axes)-> bug??
>
>
>
>
> and question.
>
> data = DIST(500)
> x = FINDGEN(500, start=1)/5
>
> c = contour(data, x, x, /ylog)
> i = image(data, x, x, /ylog, /axis)
>
> image function does not appear to ylog.(just yaxis value.....)
> but contour function is OK.
> Is that intended??
>
>
>
> idl 8.4 and 8.3
Re: image function question [message #90212 is a reply to message #90208] Wed, 11 February 2015 07:22 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 11.02.2015 02:53, Dae-Kyu Shin wrote:
> image function does not appear to ylog.
> but contour function is OK.
> Is that intended??

I think it is intended, or rather it is impossible for image() to know
exactly what to do with your image. Stretching an image and changing its
pixel resolution is a quite intrusive behavior, so that if you really
want to stretch an image you should decide the "how" by yourself.
Re: image function question [message #90213 is a reply to message #90212] Wed, 11 February 2015 08:13 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Wednesday, February 11, 2015 at 8:22:27 AM UTC-7, Fabien wrote:
> On 11.02.2015 02:53, Dae-Kyu Shin wrote:
>> image function does not appear to ylog.
>> but contour function is OK.
>> Is that intended??
>
> I think it is intended, or rather it is impossible for image() to know
> exactly what to do with your image. Stretching an image and changing its
> pixel resolution is a quite intrusive behavior, so that if you really
> want to stretch an image you should decide the "how" by yourself.

Hi all,

Fabien is correct - Image does not work with log axes - it would be weird (although possible) to stretch each pixel by a different "logarithmic" amount. So you either need to do the stretch manually... or perhaps better, you should take the log of your "y" axis values and do the contour plot without the log keyword.

And Helder's correct about the other one - if you do /disable, you had better do an /enable before trying to output.

Cheers,
Chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reopen HDF5 file to add more data?
Next Topic: MPFIT: 95% Confidence Interval ?

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

Current Time: Wed Oct 08 09:19:28 PDT 2025

Total time taken to generate the page: 0.00465 seconds