File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 6
6
import io
7
7
import os
8
8
9
+ import numpy as np
9
10
from numpy .testing import assert_array_almost_equal
10
11
12
+ from matplotlib import pyplot as plt
11
13
from matplotlib .image import imread
12
14
from matplotlib .backends .backend_agg import FigureCanvasAgg as FigureCanvas
13
15
from matplotlib .figure import Figure
14
- from matplotlib .testing .decorators import cleanup
16
+ from matplotlib .testing .decorators import image_comparison , cleanup
15
17
16
18
17
19
@cleanup
@@ -47,6 +49,20 @@ def test_repeated_save_with_alpha():
47
49
decimal = 3 )
48
50
49
51
52
+ @image_comparison (baseline_images = ['quadmesh_linewidth' ],
53
+ remove_text = True ,
54
+ extensions = ['png' ],
55
+ savefig_kwarg = {'dpi' : 400 })
56
+ def test_quadmesh_linewidth ():
57
+ fig = plt .figure (figsize = (1 , 5 ))
58
+ ax = fig .add_subplot (111 )
59
+ np .random .seed (0 )
60
+ r = np .random .random ((4 ,4 ))
61
+ ff = plt .contourf (r , interpolation = "nearest" ,extend = "both" )
62
+ cb = plt .colorbar ()
63
+ cb .solids .set_edgecolor ("face" )
64
+
65
+
50
66
def report_memory (i ):
51
67
pid = os .getpid ()
52
68
a2 = os .popen ('ps -p %d -o rss,sz' % pid ).readlines ()
Original file line number Diff line number Diff line change @@ -1925,7 +1925,7 @@ RendererAgg::draw_quad_mesh(const Py::Tuple& args)
1925
1925
1926
1926
Py::Object transforms_obj = Py::List (0 );
1927
1927
Py::Tuple linewidths (1 );
1928
- linewidths[0 ] = Py::Float (gc.linewidth );
1928
+ linewidths[0 ] = Py::Float (gc.linewidth * 72.0 / dpi );
1929
1929
Py::SeqBase<Py::Object> linestyles_obj;
1930
1930
Py::Tuple antialiaseds (1 );
1931
1931
antialiaseds[0 ] = Py::Int (antialiased ? 1 : 0 );
You can’t perform that action at this time.
0 commit comments