octave-maintainers
[Top][All Lists]
Advanced

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

Re: First datapoint is discarded on second call to plot


From: Søren Hauberg
Subject: Re: First datapoint is discarded on second call to plot
Date: Wed, 07 Mar 2007 18:39:14 +0100
User-agent: Thunderbird 1.5.0.10 (X11/20070305)

Thanks, that fixes the problem

Søren

Daniel J Sebald skrev:
Bug fix attached...


Søren Hauberg wrote:
Hi,
Running a recent checkout from cvs I got a weird behaviour when I plot to curves. This code

  figure
  hold on
    f = sin(0:0.1:2*pi);
    plot(f)
    plot(1+f)
  hold off

produces to sine curves but the second one (the upper one) is missing the first data point.

Søren




------------------------------------------------------------------------

--- /usr/local/share/octave/2.9.9+/m/plot/__uiobject_draw_axes__.m      
2007-03-04 16:14:47.000000000 -0600
+++ ./__uiobject_draw_axes__.m  2007-03-07 11:37:15.060501272 -0600
@@ -670,6 +670,8 @@
                 filespec{i}, usingclause{i}, titlespec{i}, withclause{i});
       endfor
       fputs (plot_stream, ";\n");
+      fflush (plot_stream);
+
       for i = 1:data_idx
        if (strcmp (filespec{i}, "-"))
          if (nd == 2)
@@ -688,15 +690,12 @@
              endfor
            endif
          endif
-         fputs (plot_stream, "e");
+         fputs (plot_stream, "e\n");
          fflush (plot_stream);
        endif
       endfor
     endif
- fputs (plot_stream, "\n");
-    fflush (plot_stream);
-
   else
     print_usage ();
endif


reply via email to

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