bugGNU Octave - Bugs: bug #34656, default axis limits for log plots

 
 

bug #34656: default axis limits for log plots

Submitted by:  John W. Eaton <jwe>
Submitted on:  Tue 25 Oct 2011 11:46:10 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 31 Oct 2011 11:46:35 PM UTC, comment #5:

Looks like jwe's patch below fixed this.

http://hg.savannah.gnu.org/hgweb/octave/rev/1e81e2e30af3

I assume it is ok to close?

Ben Abbott <bpabbott>
Project Member
Wed 26 Oct 2011 11:30:04 PM UTC, comment #4:

I took a quick look. The gnuplot plotstream has the ranges below.

If I change the result to the ranges below, the lower limits are displayed correctly.

Looks like a round-off problem. Over the years, I've seen similar problems with Matlab. I normally fix it by doing something like below.

Should we do that in this case? Should the change be in graphics.cc or in _go_draw_axes_.m?

If the former, can you take a look at how to best do that?

Ben Abbott <bpabbott>
Project Member
Wed 26 Oct 2011 11:03:38 PM UTC, comment #3:

FWIW Matlab has;

xlim = [1, 10^0.3[
xtick = 10.^[0 0.1 0.2 0.3];
ylim = [0.1 1];
ytick = [0.1 1];

I'll be on vacation from tomorrow till Tuesday. If gnuplot needs to be fixed quickly, it is unlikely I'll be able to take a look (although there is a small chance I'll get to it this evening).

Ben Abbott <bpabbott>
Project Member
Wed 26 Oct 2011 09:52:56 PM UTC, comment #2:

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/1e81e2e30af3

We might be able to eliminate the max_neg variable in graphics.cc now, but I didn't do that yet.

I notice that with gnuplot,

does not display a lower limit on the Y axis. It is there with OpenGL+FLTK.

John W. Eaton <jwe>
Project Administrator
Wed 26 Oct 2011 08:27:23 PM UTC, comment #1:

I noticed this a few weeks back and forgot to file a report. Matlab's ylim for this is [0.1 1].

I spent a few hours looking over the code, but was unable to see how this should be done. It looked as if the default values for the ylim/xlim/zlim properties need to depend upon the xscale/yscale/zscale properties. Perhaps a listener is needed, but I don't know how to do that.

Ben Abbott <bpabbott>
Project Member
Tue 25 Oct 2011 11:46:10 PM UTC, original submission:

Executing the following

doesn't work with either gnuplot or OpenGL+FLTK grahpics. With gnuplot, I see an error from gnuplot:

and with OpenGL+FLTK, I see an empty figure window. I think axes should be displayed and default limits should be set appropriately for the axes with log scales, for example to [.1, 1] (whatever is compatible with Matlab).

John W. Eaton <jwe>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by jwe (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 31 Oct 2011 11:46:35 PM UTCbpabbottStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1