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

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

[Octave-bug-tracker] [bug #58526] "view(az, el)" does not work


From: Rik
Subject: [Octave-bug-tracker] [bug #58526] "view(az, el)" does not work
Date: Wed, 10 Jun 2020 17:21:38 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #11, bug #58526 (project octave):

I think it may be difficult to discover, in practice, whether view() was the
function that is resulting in __gnuplot_draw_axes__.m being called.

If you look at view.m, after calculating the correct azimuth and elevetation,
it changes the property on the axes


    set (hax, "view", [az, el]);


I set a breakpoint within __gnuplot_draw_axes__.m and checked what the call
stack was after the set statement and it is


dbstack
stopped in:

  -->   __gnuplot_draw_axes__ at line 33
[/home/rik/wip/Projects_Mine/octave-dev/scripts/plot/util/private/__gnuplot_draw_axes__.m]
      __gnuplot_draw_figure__ at line 169
[/home/rik/wip/Projects_Mine/octave-dev/scripts/plot/util/private/__gnuplot_draw_figure__.m]
          __gnuplot_drawnow__ at line 91
[/home/rik/wip/Projects_Mine/octave-dev/scripts/plot/util/__gnuplot_drawnow__.m]


There isn't any indication at this point which function resulted in redrawing
the axes.  However, you might be able to modify the detection of dimensions. 
The current code is


  nd = __calc_dimensions__ (h);


This diff changes things to enforce 3-D when the view is anything other than
the default of [0, 90].


diff -r f5c9bb5955e7 scripts/plot/util/private/__gnuplot_draw_axes__.m
--- a/scripts/plot/util/private/__gnuplot_draw_axes__.m Tue Jun 09 14:11:13
2020 -0700
+++ b/scripts/plot/util/private/__gnuplot_draw_axes__.m Wed Jun 10 14:20:06
2020 -0700
@@ -56,6 +56,10 @@ function __gnuplot_draw_axes__ (h, plot_
   endif
 
   nd = __calc_dimensions__ (h);
+  if (nd == 2 && (any (get (h, "view") != [0, 90])))
+    ## view() only works correctly on 3-D axes in gnuplot (bug #58526).
+    nd = 3;
+  endif
 
   if (strcmp (axis_obj.dataaspectratiomode, "manual")
       && strcmp (axis_obj.xlimmode, "manual")






(file #49239)
    _______________________________________________________

Additional Item Attachment:

File name: bug58526.diff                  Size:0 KB
    <https://savannah.gnu.org/file/bug58526.diff?file_id=49239>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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