octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #58566] plotyy() and subplot() generate errors


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #58566] plotyy() and subplot() generate errors
Date: Mon, 15 Jun 2020 09:06:23 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #7, bug #58566 (project octave):

So maybe we should just document that that is the supported way of using
"subplot" with "plotyy" in a loop.
Maybe a "usage recommendation" at the end of the docstring of subplot.
Something in the lines of:
If subplot axes should be referenced repeatedly, consider creating and storing
their axes handles beforehand instead of calling subplot repeatedly for the
same axes.
Example:

  x = 1:10;
  y = rand (16, 10);
  for i_plot = 1:4
    hax(i_plot ) = subplot (2, 2, i_plot );
    hold (hax(i_plot ), "on");
    grid (hax(i_plot ), "on");
  endfor
  for i_loop = 1:2
    for i_plot =1:4
      iy = (i_loop -1)*4 + i_plot;
      plotyy (hax(i_plot), x,y(iy,:), x,y(iy+1,:));
    endfor
  endfor



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58566>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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