Opened 12 years ago

Last modified 11 years ago

#5448 closed enhancement

[with patch, needs work] rework save/show in plot, use Matplotlib's axes code, upgrade matplotlib — at Version 7

Reported by: mhansen Owned by: mhansen
Priority: major Milestone: sage-4.1.2
Component: graphics Keywords:
Cc: wcauchois, kcrisman Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by jason)

This makes the axes and gridline code in Sage obsolete and upgrades the matplotlib spkg.

Change History (8)

Changed 12 years ago by mhansen

comment:1 Changed 12 years ago by jason

  • Cc jason added

comment:2 Changed 12 years ago by jason

mhansen: are you still working on this, or are you posting it in hopes that someone else will work on it?

comment:3 Changed 12 years ago by mhansen

  • Owner changed from was to mhansen
  • Status changed from new to assigned

I was planning on finishing this up in the near future. I posted it because I wanted to see what all I had left to do and possibly to get feedback from others.

comment:5 Changed 12 years ago by schymans

Just a very naive question: It seems like a lot of work to include Matplotlib's functionality in plot(). Wouldn't it be easier to just transfer the list of values generated by plot() to Matplotlib? Then, the rest could be done with the conventional Matplotlib commands. So far, I have been able to do everything I wanted using Matplotlib, the only impasse being the generation of points to plot, which I believe is solved in plot() a lot more elegantly than just evaluating a number of equidistant points. I apologise in advance for my ignorance.

comment:6 Changed 12 years ago by jason

  • Summary changed from [with patch, not ready for review] rework save/show in plot, use Matplotlib's axes code to [with patch, needs work] rework save/show in plot, use Matplotlib's axes code

PLEASE KEEP MIKE'S PATCH ATTACHED TO THIS TICKET FOR NOW

(I think he might have some more elegant ways of doing things than I did, which I'd like to copy to my patch). The trac-5448-matplotlib-axes-gridlines.patch requires the new matplotlib spkg at http://sage.math.washington.edu/home/jason/matplotlib-0.99.0.spkg

Please give feedback!

comment:7 Changed 12 years ago by jason

  • Cc wcauchois kcrisman added; jason removed
  • Description modified (diff)
  • Summary changed from [with patch, needs work] rework save/show in plot, use Matplotlib's axes code to [with patch, needs work] rework save/show in plot, use Matplotlib's axes code, upgrade matplotlib

Here is the old description (applicable to Mike's patch, and some of which may be applicable to my patch):

This removes the axes.py code from Sage and switches to Matplotlib's code. This allows for things like log scales as well as more flexibility in controlling how the ticks are labeled formatted. It also fixes a number of existing bugs (like 2754). After this change, it will be trivial to add a viewer='flot' option to Graphics.

The patch still needs some work a.k.a. doctests. There are also a few things that don't work yet (like tick color and tick fontsize), and matrix_plot needs a matplotlib Locater and Formatter. Also, GraphicsArray? needs to be updated and should get lots of doctests for it added.

Note: See TracTickets for help on using tickets.