File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 22
22
23
23
# All complete themes are initiated with these rcparams. They
24
24
# can be overridden.
25
- default_rcparams = {
25
+ DEFAULT_RCPARAMS = {
26
26
"axes.axisbelow" : "True" ,
27
27
"font.sans-serif" : [
28
- # "Helvetica",
28
+ "Helvetica" ,
29
29
"DejaVu Sans" , # MPL ships with this one
30
30
"Avant Garde" ,
31
31
"Computer Modern Sans serif" ,
@@ -225,7 +225,7 @@ def __init__(
225
225
self .complete = complete
226
226
227
227
if complete :
228
- self ._rcParams = deepcopy (default_rcparams )
228
+ self ._rcParams = deepcopy (DEFAULT_RCPARAMS )
229
229
else :
230
230
self ._rcParams = {}
231
231
Original file line number Diff line number Diff line change 11
11
from matplotlib .testing .compare import compare_images
12
12
13
13
from plotnine import ggplot , theme
14
+ from plotnine .themes .theme import DEFAULT_RCPARAMS
14
15
15
16
TOLERANCE = 2 # Default tolerance for the tests
16
17
DPI = 72 # Default DPI for the tests
17
18
19
+ # To get uniform test images, we use fonts that ship with matplotlib
20
+ DEFAULT_RCPARAMS ["font.monospace" ] = ["Dejavu Sans Mono" ]
21
+ DEFAULT_RCPARAMS ["font.sans-serif" ] = ["Dejavu Sans" ]
22
+ DEFAULT_RCPARAMS ["font.serif" ] = ["Dejavu Serif" ]
23
+
18
24
# This partial theme modifies all themes that are used in
19
25
# the test. It is limited to setting the size of the test
20
26
# images Should a test require a larger or smaller figure
You can’t perform that action at this time.
0 commit comments