Ticket #3922 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

[with patch, positive review] Make nice arrows

Reported by: jason Assigned to: was
Priority: major Milestone: sage-3.1.2
Component: graphics Keywords:
Cc:

Description

We've been having lots of trouble with arrows looking nice. In this patch, there is a new matplotlib class that puts an arrow at the end of a line, using the same sort of things they do to put markers on lines. This way, the arrows:

1. don't depend on the aspect ratio of the plot

2. don't depend on the scale of the plot.

They always look pretty :).

It would be nice to eventually upstream this functionality into the matplotlib Line2D class.

Attachments

arrow_line.patch (5.3 kB) - added by jason on 09/03/2008 04:47:30 PM.

Change History

08/21/2008 03:43:43 PM changed by jason

Oh, the patch also updates the sage "arrow" class. This patch is made for after applying the patch at #3853, but it might be possible to apply it before.

08/21/2008 04:42:12 PM changed by jason

It looks like a few doctests fail when they try to do from sage.all_cmdline import * or something. I'm not sure exactly what this issue is here. The error is that, in arrow_line.py, import matplotlib throws an error that there is no module named matplotlib.

08/25/2008 12:35:13 PM changed by jason

  • summary changed from [with patch, needs review] Make nice arrows to [with patch, not quite ready yet] Make nice arrows.

08/27/2008 06:47:04 AM changed by jason

  • summary changed from [with patch, not quite ready yet] Make nice arrows to [with patch, needs review] Make nice arrows.

Updated patch to correct some of the drawing code and added documentation.

08/27/2008 06:57:44 AM changed by jason

The patch applies cleanly to sage 3.1.2alpha1. All doctests pass with the patch applied on sage.math.

08/27/2008 01:41:08 PM changed by mhansen

The arrow_line.py should probably be moved to the matplotlib spkg.

09/03/2008 04:47:30 PM changed by jason

  • attachment arrow_line.patch added.

09/03/2008 04:55:12 PM changed by jason

Patch is updated to remove the arrow_line.py file and put it in the matplotlib spkg as a patch. The updated matplotlib spkg is at: http://sage.math.washington.edu/home/jason/matplotlib-0.98.3.p1.spkg

09/03/2008 05:37:46 PM changed by mhansen

  • summary changed from [with patch, needs review] Make nice arrows to [with patch, positive review] Make nice arrows.

Looks good to me.

09/03/2008 05:45:30 PM changed by mabshoff

Positive review on the spkg.

Cheers,

Michael

09/03/2008 06:10:51 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.

Merged patch and spkg in Sage 3.1.2.rc0