Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ed27408

Browse filesBrowse files
FIX: parasite axis2 demo (#12261)
* update to fix #12208,typecasted locs to np array * added test for #12208 * Update test_axisartist_axislines.py * Update test_axisartist_axislines.py * flake8 corrections
1 parent 012498f commit ed27408
Copy full SHA for ed27408

File tree

Expand file treeCollapse file tree

2 files changed

+14
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-1
lines changed

‎lib/mpl_toolkits/axisartist/axis_artist.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/axis_artist.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def draw(self, renderer):
287287

288288
for loc, angle in self.locs_angles:
289289
marker_rotation.clear().rotate_deg(angle+add_angle)
290-
locs = path_trans.transform_non_affine([loc])
290+
locs = path_trans.transform_non_affine(np.array([loc]))
291291
if self.axes and not self.axes.viewLim.contains(*locs[0]):
292292
continue
293293
renderer.draw_markers(gc, self._tickvert_path, marker_transform,

‎lib/mpl_toolkits/tests/test_axisartist_axislines.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/tests/test_axisartist_axislines.py
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from mpl_toolkits.axisartist.axislines import SubplotZero, Subplot
66

7+
from mpl_toolkits.axisartist import Axes
8+
79

810
@image_comparison(baseline_images=['SubplotZero'],
911
extensions=['png'], style='default')
@@ -40,3 +42,14 @@ def test_Subplot():
4042
ax.axis["bottom"].major_ticks.set_tick_out(True)
4143

4244
ax.axis["bottom"].set_label("Tk0")
45+
46+
47+
def test_Axes():
48+
fig = plt.figure()
49+
ax = Axes(fig, [0.15, 0.1, 0.65, 0.8])
50+
fig.add_axes(ax)
51+
ax.plot([1, 2, 3], [0, 1, 2])
52+
53+
ax.set_xscale('log')
54+
55+
plt.show()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.