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

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

[Octave-bug-tracker] [bug #61557] plotyy causes a saveas error in strtri


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #61557] plotyy causes a saveas error in strtrim
Date: Thu, 25 Nov 2021 07:37:09 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36 Edg/96.0.1054.29

Update of bug #61557 (project octave):

                  Status:                    None => Need Info              
        Operating System:       Microsoft Windows => Any                    

    _______________________________________________________

Follow-up Comment #1:

I'm not sure if this is a bug or a usage error. Maybe someone can clarify.

The documentation of `saveas` reads:
>  -- saveas (H, FILENAME)
>  -- saveas (H, FILENAME, FMT)
>      Save graphic object H to the file FILENAME in graphic format FMT.

It uses "graphic object H" in singular.

However, in your example `ax` is a 2x1 vector containing the handles to *both*
the left and the right axes.

The following modified version works for me:

x = 0:0.1:1;
y1 = x;
y2 = 2*x;
ax = plotyy (x,y1,x,y2);
saveas(ax(1),'test.png')


Or maybe cleaner:

x = 0:0.1:1;
y1 = x;
y2 = 2*x;
hf = figure (1);
clf (hf);
plotyy (x,y1,x,y2);
saveas (hf, 'test.png')




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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