bugGNU Octave - Bugs: bug #41933, xlim, ylim, zilm should recognize...

 
 

bug #41933: xlim, ylim, zilm should recognize Inf as indication for autoscaling

Submitted by:  None
Submitted on:  Sat 22 Mar 2014 11:45:31 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Alick ZhaoOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 23 Mar 2014 06:07:53 PM UTC, comment #4:

Applied the patch to the default branch (http://hg.savannah.gnu.org/hgweb/octave/rev/5032ac119d52). This nicely solves things for xlim, ylim, zlim, and axis. The change will be part of the 4.2 release, or the reporter can build from Mercurial sources. It would also be easy enough just to copy over the files axis.m and _axis_limits_.m from the Mercurial repository into a local distribution.

Rik <rik5>
Project Administrator
Sun 23 Mar 2014 11:46:57 AM UTC, comment #3:

I attached a patch. Axis now uses x(yz)lim to avoid duplicate code.

(file #31014)

Pantxo Diribarne <pantxo>
Project Member
Sat 22 Mar 2014 06:58:40 PM UTC, comment #2:

This seems like a reasonable extension and wouldn't be that hard to implement following the same pattern as in axis.m. If someone wants to prepare a changeset I will review it. The file to change is scripts/plot/appearance/private/__axis_limits__.m. A single change there will get xlim, ylim, and zlim to all work.

Rik <rik5>
Project Administrator
Sat 22 Mar 2014 01:14:26 PM UTC, comment #1:

On Windows w Octave-3.8.1, I see (fltk graphics_toolkit):

Indeed, with gnuplot the plot stays OK & is otherwise the same as in Matlab r2014a prerelease.
So it's a problem with fltk only.

Operating system => "any"
Title adapted to indicate fltk
Item Group => incorrect result

Philip Nienhuis <philipnienhuis>
Project Member
Sat 22 Mar 2014 11:45:31 AM UTC, original submission:

Hi,

I noticed a recent commit (89a8a90ac850, bug #37006) makes axis function recognize Inf, -Inf as auto set axis limit for Matlab compatibility. But using xlim/ylim/zlim with Inf still results in empty plot. Below is a simple script to reproduce the bug.

$ cat test_xlim_inf.m
clear all; close all; clc;
x = 1:5;
figure; hold on; box on;
plot(x, x);
xlim([0 inf]);

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #31014:  lims_bug41933.patch added by pantxo (2KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pantxo (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 23 Mar 2014 06:07:53 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sun 23 Mar 2014 11:46:57 AM UTCpantxoAttached File-=>Added lims_bug41933.patch, #31014
    Sat 22 Mar 2014 07:08:04 PM UTCrik5Item GroupIncorrect Result=>Feature Request
    Sat 22 Mar 2014 06:58:40 PM UTCrik5Summaryxlim etc should also recognize Inf as axis function w. fltk=>xlim, ylim, zilm should recognize Inf as indication for autoscaling
    Sat 22 Mar 2014 01:14:26 PM UTCphilipnienhuisItem GroupMatlab Compatibility=>Incorrect Result
      StatusNone=>Confirmed
      Operating SystemGNU/Linux=>Any
      Summaryxlim etc should also recognize Inf as axis function=>xlim etc should also recognize Inf as axis function w. fltk

    Back to the top


    Powered by Savane 3.1-cleanup1