Ticket #5640 (closed defect: fixed)

Opened 17 months ago

Last modified 14 months ago

[with patch, positive review] no way to figure out list of colormaps from matrix plot's docstring

Reported by: was Owned by: kcrisman
Priority: major Milestone: sage-4.1
Component: graphics Keywords:
Cc: Author(s): Karl-Dieter Crisman
Report Upstream: Reviewer(s): Minh Van Nguyen
Merged in: sage-4.1.alpha2 Work issues:

Description

This sentence, which is in the help for contour_plot, should also be in the help for the plot method on matrices:

                        cmap -- the name of
                        a predefined colormap, a list of colors
                        or an instance of a matplotlib Colormap.
                        Type: import matplotlib.cm; matplotlib.cm.datad.keys()
                        for available colormap names.

It should also be in the output here too:

sage: matrix(QQ,1,1).plot(cmap0=0)
          	

verbose 0 (84: primitive.py, options) WARNING: Ignoring option 'cmap0'=0
verbose 0 (84: primitive.py, options) 
The allowed options for MatrixPlot defined by a 1 x 1 data grid are:
    cmap           the name of a predefined colormap, 
                        a list of colors or an instance of a 
                        matplotlib Colormap.
    zorder         The layer level in which to draw                     

Attachments

trac_5640.patch Download (34.2 KB) - added by kcrisman 15 months ago.
Depends on #6269, at least potentially
trac_5640-rebased.patch Download (17.1 KB) - added by mvngu 14 months ago.
rebased against Sage 4.1.alpha1

Change History

Changed 15 months ago by kcrisman

Depends on #6269, at least potentially

Changed 15 months ago by kcrisman

  • owner changed from was to kcrisman
  • status changed from new to assigned
  • summary changed from no way to figure out list of colormaps from matrix plot's docstring to [with patch, needs review] no way to figure out list of colormaps from matrix plot's docstring

This should take care of the issue on the description. Patch may depend on #6269; even though I can't find any specific instances where they overlap on code hunks, they do overlap in files, so better to be safe. Note that this patch does not take care of #5083. I have also added/improved documentation on the files in question.

Changed 14 months ago by mvngu

  • summary changed from [with patch, needs review] no way to figure out list of colormaps from matrix plot's docstring to [with patch, needs rebase] no way to figure out list of colormaps from matrix plot's docstring

Some hunk failures when applied against Sage 4.1.alpha0:

sage: hg_sage.apply("http://trac.sagemath.org/sage_trac/raw-attachment/ticket/5640/trac_5640.patch")
Attempting to load remote file: http://trac.sagemath.org/sage_trac/raw-attachment/ticket/5640/trac_5640.patch
Loading: [.....]
cd "/scratch/mvngu/sage-4.1.alpha0-sage.math-only-x86_64-Linux/devel/sage" && hg status
cd "/scratch/mvngu/sage-4.1.alpha0-sage.math-only-x86_64-Linux/devel/sage" && hg status
cd "/scratch/mvngu/sage-4.1.alpha0-sage.math-only-x86_64-Linux/devel/sage" && hg import   "/home/mvngu/.sage/temp/sage.math.washington.edu/23662/tmp_1.patch"
applying /home/mvngu/.sage/temp/sage.math.washington.edu/23662/tmp_1.patch
patching file sage/plot/contour_plot.py
Hunk #2 FAILED at 76
Hunk #3 FAILED at 84
Hunk #5 FAILED at 147
Hunk #6 FAILED at 223
Hunk #7 FAILED at 266
Hunk #8 FAILED at 287
Hunk #9 FAILED at 405
7 out of 9 hunks FAILED -- saving rejects to file sage/plot/contour_plot.py.rej
patching file sage/plot/density_plot.py
Hunk #2 FAILED at 78
Hunk #3 FAILED at 86
Hunk #4 FAILED at 121
3 out of 4 hunks FAILED -- saving rejects to file sage/plot/density_plot.py.rej
patching file sage/plot/matrix_plot.py
Hunk #2 FAILED at 81
Hunk #4 FAILED at 135
2 out of 4 hunks FAILED -- saving rejects to file sage/plot/matrix_plot.py.rej
abort: patch failed to apply

Changed 14 months ago by mvngu

kcrisman: Can you rebase the patch?

Changed 14 months ago by mvngu

rebased against Sage 4.1.alpha1

Changed 14 months ago by mvngu

  • reviewer set to Minh Van Nguyen
  • summary changed from [with patch, needs rebase] no way to figure out list of colormaps from matrix plot's docstring to [with patch, positive review] no way to figure out list of colormaps from matrix plot's docstring
  • author set to Karl-Dieter Crisman

The patch trac_5640-rebased.patch is rebased against Sage 4.1.alpha1 and depends on #6269. Thus patches should be applied in the following order:

  1. the rebased patch at #6269
  2. the rebased patch on this ticket

Changed 14 months ago by boothby

  • status changed from assigned to closed
  • resolution set to fixed
  • merged set to sage-4.1.alpha2
Note: See TracTickets for help on using tickets.