[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie question
From: |
Henry F. Mollet |
Subject: |
Re: Newbie question |
Date: |
Fri, 05 Aug 2005 10:47:19 -0700 |
User-agent: |
Microsoft-Entourage/11.1.0.040913 |
Thanks, Joe
[~] -bash-2.05b 501$ locate image.m
/usr/local/share/octave/2.1.71/m/image/image.m
/usr/local/share/octave/2.1.71/site/m/octave-forge/MacOSX/image.m
[~] -bash-2.05b 502$
Now please tell me why my set up is using your /MacOSX/image.m that uses
bmpwrite(A, colors, bmp_name);
## Author: Tony Richardson <address@hidden>
## Created: July 1994
## Adapted-By: jwe
## Mac OS X adaptation by J. Koski 6/24/04
Rather than image/image.m which would require ImageMagick
## Author: Tony Richardson <address@hidden>
## Created: July 1994
## Adapted-By: jwe
with:
## ImageMagick:
im_display = sprintf ("display -geometry %f%% \"%s\"", zoom*100,
ppm_name);
Also, am I correct that the same applies to X11/xterm with graphing in X
gnuplot window. I've tried and again the image, e.g. image(ones(100))
appeared in Preview.
Henry
on 8/4/05 4:19 PM, Joe Koski at address@hidden wrote:
> When a graphical output has a continuous range of color or gray scale, such
> as a photograph, octave doesn't currently have a way to pass scale
> information to gnuplot/aquaterm. As a workaround, Paul Kienzle's bmpwrite.m
> is used for image.m on a Mac. This allows the image to be written into the
> .bmp format, which is then automatically opened by the OS X in Preview.
>
> The latest gnuplot 4.0/Aquaterm 1.0 combination now has color/gray scale
> capabilities. It's a matter of developing the necessary routines.
>
> Joe
>
>
> on 8/4/05 4:57 PM, Henry F. Mollet at address@hidden wrote:
>
>> I've recently pointed out a similar problem with respect to contourf(z) in
>> octave-forge. The output is sent to Preview and I don't understand why.
>> Henry
>> octave:62> gset term aqua 0
>> octave:63> [x,y] = meshgrid(linspace(-2,2,200));
>> octave:64> z = sinc(sqrt(x.^2 + y.^2));
>> octave:65> contourf(z);
>> error: expecting integer index, found 7.300000
>> error: evaluating argument list element number 1
>> error: called from `contourf' in file
>> `/usr/local/share/octave/2.1.71/site/m/octave-forge/plot/contourf.m'
>>
>> octave:65> contourf(z); % works when used for the second time and output
>> appears in Preview rather than Aquaterm.
>>
>> ## contourf(z,n,w)
>> ## Plots a filled contour plot of n levels using the current
>> ## colormap. The width w is the width of the convolution window
>> ## which smooths the contours.
>> ##
>> ## E.g.,
>> ## [x,y] = meshgrid(linspace(-2,2,200));
>> ## z = sinc(sqrt(x.^2 + y.^2)) + 0.5*randn(size(x));
>> ## contourf(z);
>> ##
>> ## Note that the algorithm computes incorrect contours near the
>> ## edges, which you can see using contourf(sinc(sqrt(x.^2+y.^2)))
>> ## with x,y from above.
>>
>> ## This program is in the public domain
>> ## Author: Paul Kienzle <address@hidden>
>>
>> function contourf(z,n,w)
>> if nargin < 3, w = 16; end
>> if nargin < 2, n = 10; end
>> if nargin < 1 || nargin > 3
>> usage("contourf(z [, n [, w]])");
>> endif
>>
>> ## convolute the original with a gaussian if desired
>> if w > 0
>> [x,y] = meshgrid(2.5*linspace(-1,1,w));
>> B = exp(-.5*(x.^2+y.^2));
>> z = filter2(B,z,"same");
>> endif
>>
>> ## find the contours
>> C = colormap;
>> colormap(repmat(linspace(0.5,1,n+1)',1,3));
>> z = filter2(ones(2)/4,imagesc(z));
>> z(z!=fix(z)) = 0;
>>
>> ## plot the image, with the contours drawn in black.
>> colormap([0,0,0; C(linspace(1,rows(C),n+1),:)]);
>> image(flipud(z)+1);
>>
>> ## restore the colormap
>> colormap(C);
>> endfunction
>>
>>
>> on 8/4/05 2:17 PM, Melvyn Poore at address@hidden wrote:
>>
>>> Hi folks, I¹m new on the block, so forgive me for asking beginner¹s
>>> questions. I¹ve installed Octave 2.1.71, Gnuplot, Aqua and X11 on my Mac Ti
>>> Powerbook 550MHz, OSX 10.4.2. It all appears to function as it should.
>>> That was already quite an achievement!
>>>
>>> I¹m working on some sound analysis examples and want to put the waveform and
>>> spectrogram plots together in a two-plot diagram. This doesn¹t seem to work
>>> because plot() sends its results out via Aqua whereas the output of
>>> imagesc() appears in a Mac Preview window. Am I missing some terminal
>>> setting or something? I¹ve already set the line
>>>
>>> __gnuplot_set__ term aqua
>>>
>>> in startup/octaverc.
>>>
>>> Any help would be appreciated!
>>>
>>> Melvyn
>>
>>
>>
>>
>>
>> -------------------------------------------------------------
>> Octave is freely available under the terms of the GNU GPL.
>>
>> Octave's home on the web: http://www.octave.org
>> How to fund new projects: http://www.octave.org/funding.html
>> Subscription information: http://www.octave.org/archive.html
>> -------------------------------------------------------------
>>
>
>
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------