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

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

[Octave-bug-tracker] [bug #55574] axis equal truncates upper and lower p


From: Rik
Subject: [Octave-bug-tracker] [bug #55574] axis equal truncates upper and lower parts of picture
Date: Fri, 25 Jan 2019 13:35:37 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #1, bug #55574 (project octave):

This issue keeps coming up in many different disguises.  The fundamental issue
is that Octave clips (does not display) pixels in image objects which are
outside the axes.  When 'axis equal' is issued it makes the linear distances
of the X and Y axes equal, but it has to do this by shortening one of the axes
because the original immage is 10x11.

Here is sample Octave session showing that.


octave:22> clf
octave:23> img = uint8 ([10: -1: 0] * 25)';
octave:24> size (img)
ans =

   11    1

octave:25> imshow (pic)
octave:26> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:27> axis equal
octave:28> axis
ans =

    0.50000   10.50000    2.05645    9.94355

octave:29> axis image
octave:30> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:31> diary off
octave:22> clf
octave:23> img = uint8 ([10: -1: 0] * 25)';
octave:24> size (img)
ans =

   11    1

octave:25> imshow (pic)
octave:26> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:27> axis equal
octave:28> axis
ans =

    0.50000   10.50000    2.05645    9.94355

octave:29> axis image
octave:30> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:31> diary off
octave:22> clf
octave:23> img = uint8 ([10: -1: 0] * 25)';
octave:24> size (img)
ans =

   11    1

octave:25> imshow (pic)
octave:26> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:27> axis equal
octave:28> axis
ans =

    0.50000   10.50000    2.05645    9.94355

octave:29> axis image
octave:30> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:31> diary off
octave:22> clf
octave:23> img = uint8 ([10: -1: 0] * 25)';
octave:24> size (img)
ans =

   11    1

octave:25> imshow (pic)
octave:26> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:27> axis equal
octave:28> axis
ans =

    0.50000   10.50000    2.05645    9.94355

octave:29> axis image
octave:30> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:31> diary off
octave:22> clf
octave:23> img = uint8 ([10: -1: 0] * 25)';
octave:24> size (img)
ans =

   11    1

octave:25> imshow (pic)
octave:26> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:27> axis equal
octave:28> axis
ans =

    0.50000   10.50000    2.05645    9.94355

octave:29> axis image
octave:30> axis
ans =

    0.50000   10.50000    0.50000   11.50000

octave:31> diary off


The quick solution is that you want 'axis image', i.e., "tight" + "equal" to
properly display an image object.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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