[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49494] rescaling axes does not modify gca.yli
From: |
Clinton Winant |
Subject: |
[Octave-bug-tracker] [bug #49494] rescaling axes does not modify gca.ylim |
Date: |
Mon, 31 Oct 2016 20:01:08 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 |
URL:
<http://savannah.gnu.org/bugs/?49494>
Summary: rescaling axes does not modify gca.ylim
Project: GNU Octave
Submitted by: cwinant
Submitted on: Mon 31 Oct 2016 08:01:05 PM GMT
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Clinton Winant
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 4.2.0-rc2
Operating System: GNU/Linux
_______________________________________________________
Details:
The enclosed script plots a straight line twice. Both the script and
resulting figure are attached. In the right hand plot, the y-axis tick mode
has been set to manual. Since the right and left plots are not the same, I
conclude that the y-axis has been rescaled by the set(gca... call. However a
subsequent call to gca shows that ylim is the same for both plots. As a
result the line "rescale" is placed correctly in only the left hand plot.
Ubuntu 16.04 gl2ps 1.3.8
GNU Octave, version 4.2.0-rc2
Copyright (C) 2016 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'.
Octave was configured for "x86_64-pc-linux-gnu".
Additional information about Octave is available at http://www.octave.org.
Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html
Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.
>> subplot(1,2,1)
>> plot([0 1],[-2.02 1.3311],'k','linewidth',2);hold on
>> plot([0 1],[0 0],'k')
>> %% set(gca,'ytickmode','manual','ytick',[]);
>> sgca=get(gca);
>> text(.1,.5,num2str(sgca.ylim(1),"%3.1f"))
>> text(.3,.5,num2str(sgca.ylim(2),"%3.1f"))
>> text(0.1,sgca.ylim(1),'rescale')
>> %% plot the same thing, but force rescale by turning
>> %% ytickmode to manual
>> subplot(1,2,2)
>> plot([0 1],[-2.02 1.3311],'k','linewidth',2);hold on
>> plot([0 1],[0 0],'k')
>> set(gca,'ytickmode','manual','ytick',[]);
>> sgca=get(gca);
>> text(.1,.5,num2str(sgca.ylim(1),"%3.1f"))
>> text(.3,.5,num2str(sgca.ylim(2),"%3.1f"))
>> text(0.1,sgca.ylim(1),'rescale')
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 31 Oct 2016 08:01:05 PM GMT Name: debug_rescale.m Size: 612B By:
cwinant
<http://savannah.gnu.org/bugs/download.php?file_id=38848>
-------------------------------------------------------
Date: Mon 31 Oct 2016 08:01:05 PM GMT Name: debug_rescale.eps Size: 8kB
By: cwinant
<http://savannah.gnu.org/bugs/download.php?file_id=38849>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49494>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #49494] rescaling axes does not modify gca.ylim,
Clinton Winant <=