@@ -1914,41 +1914,6 @@ def _get_offset_text(self):
1914
1914
self .offset_text_position = 'bottom'
1915
1915
return offsetText
1916
1916
1917
- def _get_pixel_distance_along_axis (self , where , perturb ):
1918
- """
1919
- Returns the amount, in data coordinates, that a single pixel
1920
- corresponds to in the locality given by "where", which is also given
1921
- in data coordinates, and is an x coordinate. "perturb" is the amount
1922
- to perturb the pixel. Usually +0.5 or -0.5.
1923
-
1924
- Implementing this routine for an axis is optional; if present, it will
1925
- ensure that no ticks are lost due to round-off at the extreme ends of
1926
- an axis.
1927
- """
1928
-
1929
- # Note that this routine does not work for a polar axis, because of
1930
- # the 1e-10 below. To do things correctly, we need to use rmax
1931
- # instead of 1e-10 for a polar axis. But since we do not have that
1932
- # kind of information at this point, we just don't try to pad anything
1933
- # for the theta axis of a polar plot.
1934
- if self .axes .name == 'polar' :
1935
- return 0.0
1936
-
1937
- #
1938
- # first figure out the pixel location of the "where" point. We use
1939
- # 1e-10 for the y point, so that we remain compatible with log axes.
1940
-
1941
- # transformation from data coords to display coords
1942
- trans = self .axes .transData
1943
- # transformation from display coords to data coords
1944
- transinv = trans .inverted ()
1945
- pix = trans .transform_point ((where , 1e-10 ))
1946
- # perturb the pixel
1947
- ptp = transinv .transform_point ((pix [0 ] + perturb , pix [1 ]))
1948
- dx = abs (ptp [0 ] - where )
1949
-
1950
- return dx
1951
-
1952
1917
def set_label_position (self , position ):
1953
1918
"""
1954
1919
Set the label position (top or bottom)
@@ -2261,33 +2226,6 @@ def _get_offset_text(self):
2261
2226
self .offset_text_position = 'left'
2262
2227
return offsetText
2263
2228
2264
- def _get_pixel_distance_along_axis (self , where , perturb ):
2265
- """
2266
- Returns the amount, in data coordinates, that a single pixel
2267
- corresponds to in the locality given by *where*, which is also given
2268
- in data coordinates, and is a y coordinate.
2269
-
2270
- *perturb* is the amount to perturb the pixel. Usually +0.5 or -0.5.
2271
-
2272
- Implementing this routine for an axis is optional; if present, it will
2273
- ensure that no ticks are lost due to round-off at the extreme ends of
2274
- an axis.
2275
- """
2276
-
2277
- #
2278
- # first figure out the pixel location of the "where" point. We use
2279
- # 1e-10 for the x point, so that we remain compatible with log axes.
2280
-
2281
- # transformation from data coords to display coords
2282
- trans = self .axes .transData
2283
- # transformation from display coords to data coords
2284
- transinv = trans .inverted ()
2285
- pix = trans .transform_point ((1e-10 , where ))
2286
- # perturb the pixel
2287
- ptp = transinv .transform_point ((pix [0 ], pix [1 ] + perturb ))
2288
- dy = abs (ptp [1 ] - where )
2289
- return dy
2290
-
2291
2229
def set_label_position (self , position ):
2292
2230
"""
2293
2231
Set the label position (left or right)
0 commit comments