Opened 4 years ago

Closed 4 years ago

#19988 closed defect (fixed)

Update to matplotlib 1.5.1

Reported by: vbraun Owned by:
Priority: major Milestone: sage-7.1
Component: packages: standard Keywords:
Cc: aginiewicz, fbissey, etn40ff Merged in:
Authors: Volker Braun Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 2693234 (Commits) Commit: 2693234fa0bb9d2bf408795a9504ecf28fc0c9b6
Dependencies: Stopgaps:

Description (last modified by vbraun)

Trivial update; New tarball created with the spkg-src script, already on mirrors.

Change History (17)

comment:1 Changed 4 years ago by vbraun

  • Authors set to Volker Braun
  • Component changed from PLEASE CHANGE to packages: standard
  • Description modified (diff)
  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 4 years ago by vbraun

  • Branch set to u/vbraun/update_to_matplotlib_1_5_1

comment:3 Changed 4 years ago by vbraun

  • Commit set to af17b3fe3088ffa241b3c4536d59d9b3135c4802
  • Description modified (diff)

New commits:

af17b3fUpdate to matplotlib 1.5.1

comment:4 Changed 4 years ago by git

  • Commit changed from af17b3fe3088ffa241b3c4536d59d9b3135c4802 to 87be781c234bcb3f717f9b43a519dfd037e0474d

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

87be781Update to matplotlib 1.5.1

comment:5 Changed 4 years ago by vbraun

  • Status changed from new to needs_review

New commits:

87be781Update to matplotlib 1.5.1

comment:6 Changed 4 years ago by dimpase

sage -t --warn-long 44.7 src/sage/plot/graphics.py  # 2 doctests failed
sage -t --warn-long 44.7 src/sage/plot/contour_plot.py  # 1 doctest failed

something to do with Contour levels must be increasing, e.g.

sage -t --warn-long 44.7 src/sage/plot/contour_plot.py
**********************************************************************
File "src/sage/plot/contour_plot.py", line 638, in sage.plot.contour_plot.implicit_plot
Failed example:
    implicit_plot(x^2+y^2-2, (x,-3,3), (y,-3,3))
Expected:
    Graphics object consisting of 1 graphics primitive
Got:
    doctest:590: RichReprWarning: Exception in _rich_repr_ while displaying object: Contour levels must be increasing
    Graphics object consisting of 1 graphics primitive

comment:7 Changed 4 years ago by dimpase

google says "This error was added in matplotlib 1.5.1 because of a bug in all versions of contourf prior to 1.5.0."

comment:8 Changed 4 years ago by dimpase

  • Status changed from needs_review to needs_work

comment:9 Changed 4 years ago by aginiewicz

This was already on sage-devel - https://groups.google.com/forum/#!topic/sage-devel/eeuC8CYUsnM - I thought it was in 1.5.0 as well, now I noticed François explicitly mentioned 1.5.1.

Anyway, I tested that None does not work, but changing default option of contours=[0,0] in implicit_plot to contours=[-1e307,0,1e307] (like in region_plot) seems to work, but I'm not sure if this does not break something else.

Last edited 4 years ago by aginiewicz (previous) (diff)

comment:10 Changed 4 years ago by aginiewicz

  • Cc aginiewicz added

comment:11 Changed 4 years ago by fbissey

  • Cc fbissey added

comment:12 Changed 4 years ago by dimpase

RTFM :-) The most meaningful output seems to be with contours=0. The docs of contour_plot say

  * "contours" -- integer or list of numbers (default: "None"): If
     a list of numbers is given, then this specifies the contour
     levels to use.  If an integer is given, then this many contour
     lines are used, but the exact levels are determined
     automatically. If "None" is passed (or the option is not given),
     then the number of contour lines is determined automatically, and
     is usually about 5.

and this explains why None gives you nonsense, usually. contours=1 give 2 contours, not 1, apparently there is a shift by 1 somewhere...

comment:13 Changed 4 years ago by etn40ff

  • Cc etn40ff added

comment:14 Changed 4 years ago by git

  • Commit changed from 87be781c234bcb3f717f9b43a519dfd037e0474d to 2693234fa0bb9d2bf408795a9504ecf28fc0c9b6

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

80734daUpdate to matplotlib 1.5.1
b028ed1Change the implicit_plot contour default
2693234Update implicit_plot docstring with new-style contiuation markers

comment:15 Changed 4 years ago by vbraun

  • Status changed from needs_work to needs_review

An implicit plot is just a contour plot with a single contour at 0, not two contours at zero. The old contours=[0,0] probably never made sense...

comment:16 Changed 4 years ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

OK, looks good to me

comment:17 Changed 4 years ago by vbraun

  • Branch changed from u/vbraun/update_to_matplotlib_1_5_1 to 2693234fa0bb9d2bf408795a9504ecf28fc0c9b6
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.