Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in axis plotting with large values #5645

Closed
robertwb opened this issue Mar 30, 2009 · 4 comments
Closed

error in axis plotting with large values #5645

robertwb opened this issue Mar 30, 2009 · 4 comments

Comments

@robertwb
Copy link
Contributor

sage: plot(e^(x^-2), (x, -1, 1))
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "/Users/robert/sage/current/local/lib/python2.5/site-packages/IPython/Prompts.py", line 551, in __call__
    manipulated_val = self.display(arg)
  File "/Users/robert/sage/current/local/lib/python2.5/site-packages/IPython/Prompts.py", line 577, in _display
    return self.shell.hooks.result_display(arg)
  File "/Users/robert/sage/current/local/lib/python2.5/site-packages/IPython/hooks.py", line 141, in __call__
    ret = cmd(*args, **kw)
  File "/Users/robert/sage/current/local/lib/python2.5/site-packages/IPython/hooks.py", line 171, in result_display
    out = pformat(arg)
  File "/Users/robert/sage/current/local/lib/python2.5/pprint.py", line 111, in pformat
    self._format(object, sio, 0, 0, {}, 0)
  File "/Users/robert/sage/current/local/lib/python2.5/pprint.py", line 129, in _format
    rep = self._repr(object, context, level - 1)
  File "/Users/robert/sage/current/local/lib/python2.5/pprint.py", line 195, in _repr
    self._depth, level)
  File "/Users/robert/sage/current/local/lib/python2.5/pprint.py", line 207, in format
    return _safe_repr(object, context, maxlevels, level)
  File "/Users/robert/sage/current/local/lib/python2.5/pprint.py", line 292, in _safe_repr
    rep = repr(object)
  File "sage_object.pyx", line 98, in sage.structure.sage_object.SageObject.__repr__ (sage/structure/sage_object.c:1085)
  File "https://user-images.githubusercontent.com/124320864/216875314-f930e187-af63-475e-a6c1-f4b377742649.png.py", line 861, in _repr_
    self.show()
  File "https://user-images.githubusercontent.com/124320864/216875314-f930e187-af63-475e-a6c1-f4b377742649.png.py", line 1297, in show
    hgridlinesstyle=hgridlinesstyle)
  File "https://user-images.githubusercontent.com/124320864/216875314-f930e187-af63-475e-a6c1-f4b377742649.png.py", line 1543, in save
    xmin, xmax, ymin, ymax = sage_axes.add_xy_axes(subplot, xmin, xmax, ymin, ymax)
  File "https://user-images.githubusercontent.com/124320864/216875314-f930e187-af63-475e-a6c1-f4b377742649.png/axes.py", line 325, in add_xy_axes
    x_axis_ypos, ystep, ytslminor, ytslmajor = self._find_axes(ymin, ymax)
  File "https://user-images.githubusercontent.com/124320864/216875314-f930e187-af63-475e-a6c1-f4b377742649.png/axes.py", line 241, in _find_axes
    tslmajor, oppaxis, step = self._tasteful_ticks(minval, maxval)
  File "https://user-images.githubusercontent.com/124320864/216875314-f930e187-af63-475e-a6c1-f4b377742649.png/axes.py", line 125, in _tasteful_ticks
    sl = [s for s in str(int(absmax))]
OverflowError: cannot convert float infinity to long

CC: @sagetrac-mvngu

Component: graphics

Issue created by migration from https://trac.sagemath.org/ticket/5645

@kcrisman
Copy link
Member

comment:1

To release manager: this ticket has been resolved by #5448. The graph still looks terrible! But that would be a different ticket.

@jasongrout
Copy link
Member

comment:2

This should be closed due to #5448

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 29, 2009

based on Sage 4.1.2.alpha4

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 29, 2009

comment:3

Attachment: plot.png

This has been fixed in Sage 4.1.2.alpha4. Closing this ticket as fixed by #5448:

[mvngu@darkstar sage-4.1.2.alpha4]$ ./sage -br main

----------------------------------------------------------
sage: Building and installing modified Sage library files.


Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Time to execute 0 commands: 2.59876251221e-05 seconds
Finished compiling Cython code (time = 4.20651006699 seconds)
running install
running build
running build_py
running build_ext
Total time spent compiling C/C++ extensions:  0.156050920486 seconds.
running install_lib
running install_egg_info
Removing /home/mvngu/scratch/sandbox/sage-4.1.2.alpha4/local/lib/python2.6/site-packages/sage-0.0.0-py2.6.egg-info
Writing /home/mvngu/scratch/sandbox/sage-4.1.2.alpha4/local/lib/python2.6/site-packages/sage-0.0.0-py2.6.egg-info
----------------------------------------------------------------------
| Sage Version 4.1.2.alpha4, Release Date: 2009-09-27                |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
**********************************************************************
*                                                                    *
* Warning: this is a prerelease version, and it may be unstable.     *
*                                                                    *
**********************************************************************
sage: plot(e^(x^-2), (x, -1, 1))

The resulting plot is attached.

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Sep 29, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants