[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plotting problem
From: |
Etienne Grossmann |
Subject: |
Re: Plotting problem |
Date: |
Tue, 2 May 2006 10:43:23 -0400 |
User-agent: |
Mutt/1.4.2.1i |
Methodological note: I didn't know a thing of
set style data filledcurves y1=0
5 minutes ago. I just started gnuplot, typed 'help fill' and followed
from there.
Good hacking,
Etienne
On Tue, May 02, 2006 at 10:39:05AM -0400, Etienne Grossmann wrote:
#
# Hi Matthias,
#
# shing like
#
# xx = linspace (-7,7,100);
# y1 = sin (xx); y2 = 0.8*sin(xx+pi/6); y3 = 0.64*sin(xx+pi/3);
# __gnuplot_raw__ ("set style data filledcurves y1=0;\n")
# plot (xx,y1,xx,y2,xx,y3)
#
# ?
#
# Hth,
#
# Etienne
#
# On Tue, May 02, 2006 at 03:25:33PM +0200, Matthias Brennwald wrote:
# # Dear all,
# #
# # before reading further, a short warning: I'm a newbie (both with
# # Octave and with this list), so...
# #
# # I am trying to write some code that plots a "waterfall diagram" (aka.
# # "cumulative spectral decay diagram", CSD diagram). An example of such
# # plot is available here: http://www.euronet.nl/users/temagm/audio/
# # waterfall_focal.htm
# #
# # I want this code to work both under Matlab and Octave. I use Octave
# # 2.1.72 on the Mac, but the code should not be limited to this
# # specific setup.
# #
# # My approach to plotting the waterfall is this (see also example code
# # below): first, plot the curve in the back as a filled polygon. Then,
# # plot the next curve also as filled polygon above the one in the back;
# # and continue in the same way until the frontmost curve. With Matlab,
# # I can use 'fill3' easily plot these polygons. With plain vanilla
# # Octave, the only options I have is 'mesh' or '__gnuplot_splot__',
# # which I cannot make plot FILLED polygons. (I also tried the 'fill3'
# # command from Octave-forge, but with no luck. Also, I want my code to
# # be independent of Octave-forge, because Octave-forge is not available
# # as a 'stable' version from Fink for easy installation on the Mac.)
# #
# # Any help or ideas?
# #
# # Matthias
# #
# #
# #
# #
# # An example illustrating my approach (and problem) is this:
# #
# # **********************
# # % First, make up three curves z(x) to play with. Each of the curves
# # have constant y (y=1,2,3):
# # x = [0:100];
# # y = [ 0:2 ];
# # z = [ 2+sin(x/10);
# # 1.8 + 0.8*sin(x/11);
# # 1.5 + 0.6*sin(x/12); ];
# #
# # % append some points so we get closed curves:
# # x = [ x x(end) x(1) x(1) ];
# # z = [ z [0 0 0]' [0 0 0]' z(:,1) ];
# #
# # for n=1:3
# # if exist('OCTAVE_VERSION') % we're running Octave
# # mesh(x,y(n),z(n,:)); % this plot TRANSPARENT polygons
# # else % we're running Matlab
# # poly=fill3(x,repmat(y(n),1,length(z(n,:))),z(n,:),'w'); %
# # this plots a filled polygon with fill color 'white'
# # set(poly,'EdgeColor','r'); % this sets the edge of the
# # polygon to 'red'
# # end
# # hold on
# # end
# #
# # hold off
# # **********************
# #
# #
# #
# #
# # -------
# # Matthias Brennwald
# # Lägernstrasse 6
# # CH 8037 Zürich
# # +41 (0)44 364 17 03
# # address@hidden
# #
# #
# #
# # _______________________________________________
# # Help-octave mailing list
# # address@hidden
# # https://www.cae.wisc.edu/mailman/listinfo/help-octave
#
# --
# Etienne Grossmann ------ http://www.cs.uky.edu/~etienne
--
Etienne Grossmann ------ http://www.cs.uky.edu/~etienne