@@ -2653,14 +2653,30 @@ def to_axis_style(self):
26532653 return AxisStyle (self )
26542654
26552655
2656- class AxisStyle (Style ):
2656+ class AxisStyle (object ):
2657+ # used exclusively for graphics generated inside GraphicsBox.create_axes().
2658+ # wraps a Style instance for graphics and does not operate on local but on
2659+ # screen space, i.e. has to apply "local_to_screen" to all widths, sizes, ...
2660+
26572661 def __init__ (self , style ):
2658- super (AxisStyle , self ).__init__ (style .graphics , style .edge , style .face )
2659- self .styles = style .styles
2660- self .options = style .options
2662+ self .base = Style (style .graphics )
2663+ self .base .extend (style )
2664+ self .sx = style .graphics .local_to_screen .matrix [0 ][0 ]
2665+
2666+ def extend (self , style , pre = True ):
2667+ self .base .extend (style .base , pre )
2668+
2669+ def clone (self ):
2670+ return AxisStyle (self .base .clone ())
2671+
2672+ def get_style (self , * args , ** kwargs ):
2673+ return self .base .get_style (* args , ** kwargs )
2674+
2675+ def get_option (self , name ):
2676+ return self .base .get_option (name )
26612677
26622678 def get_line_width (self , face_element = True ):
2663- return 0.5
2679+ return self . base . get_line_width ( face_element ) * self . sx
26642680
26652681
26662682def _flatten (leaves ):
0 commit comments