Opened 3 years ago

Last modified 3 years ago

#25799 closed defect

Remove hardcoded default matplotlib stylesheet — at Version 5

Reported by: klee Owned by:
Priority: major Milestone: sage-8.4
Component: graphics Keywords:
Cc: fbissey, strogdon Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/klee/25799 (Commits, GitHub, GitLab) Commit: 91736728f417dd7598a0eff1ec30bf6125a6fa2a
Dependencies: Stopgaps:

Status badges

Description (last modified by klee)

This does not work:

import matplotlib as mpl 
mpl.rcParams[''] = 'Impact'
text("A text here", (1,1))

because of hardcoded matplotlib stylesheet (classic), which silently overwrites the rc parameters. Putting configurations in the file matplotlibrc also does not work because of the same reason.

The patch removes the hardcoded default matplotlib stylesheet that silently applies to all graphics. With this patch, the usual method to apply a style to graphics works, like

import matplotlib.pyplot as plt'seaborn')
text("A text here", (1,1))

Change History (5)

comment:1 Changed 3 years ago by klee

  • Branch set to u/klee/25799

comment:2 Changed 3 years ago by klee

  • Description modified (diff)

comment:3 Changed 3 years ago by git

  • Commit set to 91736728f417dd7598a0eff1ec30bf6125a6fa2a

Branch pushed to git repo; I updated commit sha1. New commits:

9173672Remove hardcoded matplotlib stylesheet

comment:4 Changed 3 years ago by klee

  • Status changed from new to needs_review

comment:5 Changed 3 years ago by klee

  • Description modified (diff)
Note: See TracTickets for help on using tickets.