10000 [Sprint] Added a test for 3d plots in PDF backend by tbekolay · Pull Request #2163 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

[Sprint] Added a test for 3d plots in PDF backend #2163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Added mplot3d tests in mpl_toolkits.tests
- This complements PR #2135
  • Loading branch information
tbekolay committed Jun 28, 2013
commit 80c5788cf79960343eef0d7a51a5ced492f5bdae
15 changes: 2 additions & 13 deletions lib/matplotlib/tests/test_backend_pdf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- encoding: utf-8 -*-

import io

import numpy as np

from matplotlib import cm, rcParams
Expand Down Expand Up @@ -28,22 +30,9 @@ def test_use14corefonts():

@cleanup
def test_type42():
import io

rcParams['pdf.fonttype'] = 42

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1,2,3])
fig.savefig(io.BytesIO())

def test_3d():
import io
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(1, 1, 1, projection='3d')
ax.view_init(elev=None, azim= -15)
X, Y = np.meshgrid(np.arange(3), np.arange(3))
Fs = X * Y
ax.plot_surface(X, Y, Fs, cmap=cm.jet, lw=0, antialiased=False)
plt.savefig(io.BytesIO())
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
0