[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: image, imshow and similar display empty axes

From: Ben Abbott
Subject: Re: image, imshow and similar display empty axes
Date: Sun, 04 Nov 2012 13:15:20 -0500

On Nov 3, 2012, at 11:57 PM, nicos wrote:

> bpabbott wrote
>> *** Please "reply-all" and respond at the bottom of the email ***
>> On Nov 2, 2012, at 5:16 AM, Jan-Timm Kuhr wrote:
>>> On 31.10.2012, at 22:02, Ben Abbott wrote:
>>>> On Oct 31, 2012, at 3:15 PM, Jan-Timm Kuhr wrote:
>>>>> Hello,
>>>>> I'm working on with octave 3.6.3. on a Mac.
>>>>> When I try to plot a 2D image, say by using image(rand(10)), I get an
>>>>> correct set of axes, but filled with with white space instead.
>>>>> 1d plots seem to work alright.
>>>>> I suspect that it has something to do with working on a Mac.
>>>>> I found this here
>>>>> but it links to another thread, which is rather cryptic, at least to
>>>>> me.
>>>>> Thanks a lot for any help,
>>>>> jan
>>>> If you try ...
>>>>    h = image (rand (10))
>>>>    set (h, "cdatamapping", "scaled")
>>>> ... do you get what you expect?
>>>> If so, you can try "imagesc()" instead of "image()"
>>>> Ben
>>> Thanks Ben but it does not seem to have anything to do with the scaling
>>> of the color map.
>>> Best,
>>> Jan
>> With Octave 3.6.3 from Fink on MacOS 10.6.8 using Gnuplot 4.6 patchlevel 0
>> and AquaTerm v1.0.1.
>> The command  image(rand(10)) produces a solid navy blue image.
>> imagesc(rand(10)) produces random colors.
>> I'm get the same result using Octave 3.4.0 from MacPorts (on MacOS 10.7.5
>> with Gnuplot 4.6 patchlevel 1 and AquaTerm v1.1.1).
>> Where did you get your Octave, Gnuplot and AquaTerm?  And what version of
>> MacOS are you running?
>> Ben
> Hello, 
> I am not the original reporter of the issue, but I have the exact same
> problem. 
> I am running on OS X 10.8.2, with all programs built from Macports (octave
> 3.6.3, gnuplot 4.6.1, aquaterm 1.1.1). 
> When trying to plot an image with gnuplot with aquaterm, everything seems
> fine:
>   plot "image.png" binary filetype=png w rgbimage
> Then, when plotting a curve in octave, everything runs fine too: 
>   plot(rand(1, 10))
> However, imaging in aquaterm provides an empty set of axes (white
> background):
>   im = imread('image.png');
>   imagesc(im);
> Then, if changing the term to x11, the image can be displayed:
>   setenv("GNUTERM", "x11");
>   imagesc(im);
> So that it really seems that there is an issue between octave and aqua
> terminal. 
> Nicolas

Thanks for looking into this Nicolas.  I've been able to isolate the problem to 
Gnuplot.  From Octave I created a simple image file.

        im = uint8 (round (255 * rand (5,4,3)))
        imwrite (im, "image.png", "png");

Then from Gnuplot, using the "aqua" terminal, I get a blank plot box.  But with 
"qt", or "x11" I get the expected result.

        set terminal aqua
        set xrange [-5.000000000000000e-01:3.500000000000000e+00] noreverse;
        set yrange [-5.000000000000000e-01:4.500000000000000e+00] reverse;
        unset key;
        unset colorbox;
        plot "image.png" binary filetype=png w rgbimage

Looks like this is either a gnuplot or AquaTerm bug.  I've filed a bug report 
with Gnuplot.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]