[Top][All Lists]

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

Gnuplot problem

From: John W. Eaton
Subject: Gnuplot problem
Date: Tue, 17 Mar 1998 12:19:19 -0600

On 16-Mar-1998, Dave Jansing <address@hidden> wrote:

| I am very excited about using octave for future research!  So far, I have
| been very impressed with what I have seen (I have only downloaded and used
| it today).  However, I am having a small problem with the plotting function
| and am hoping that someone can help.
| In calling up this simple program:
| %     M-file for Example 1-15
| %
| t=-10:.005:10;
| x=stp_fn(t-2);                        % Generate step starting at t=2
| y=impls_fn(t+2.5, 0.05);      % Generate unit impulse at t=-3.5
| z=2*rmp_fn(4-t);              % Generate backwars ramp starting at t=4
| subplot(3,1,1),plot(t,x),axis([-10 10 0 1.5]),xlabel('t'),ylabel('u(t-2)')
| subplot(3,1,2),plot(t,y),axis([-10 10 0 25]),xlabel('t'),ylabel('delta(t+3)')
| subplot(3,1,3),plot(t,z),xlabel('t'),ylabel('2r(4-t)')
| It will generate the plots with no problem, however the labels on the X and Y
| axis are missing.  Have I missed something in the installation process?

One possible solution is to set the variable automatic_replot to a
nonzero value.  Unfortunately, this will make your plot do some weird
dance before it is finally displayed.  To avoid that, you could just
call replot once after each call to ylabel.

Another solution is to call xlabel and ylabel before the plot command.

In any case, because of the way gnuplot places multiple plots with
labels on the X11 window, I don't think you'll be too happy with the
result.  But I think this is a bug in gnuplot, not Octave.


reply via email to

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