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

Pep8ify examples #3425

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

Merged
merged 21 commits into from
Sep 9, 2014
Merged
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
Next Next commit
comments containing code may not start with a space after the pound
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
  • Loading branch information
twmr committed Aug 30, 2014
commit 47fbcd5af9997d4cb1dbfcfeaf7894097aa43628
2 changes: 1 addition & 1 deletion 2 examples/animation/basic_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def update_line(num, data, line):
plt.title('test')
line_ani = animation.FuncAnimation(fig1, update_line, 25, fargs=(data, l),
interval=50, blit=True)
# line_ani.save('lines.mp4')
#line_ani.save('lines.mp4')

fig2 = plt.figure()

Expand Down
2 changes: 1 addition & 1 deletion 2 examples/animation/dynamic_image2.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def f(x, y):
ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True,
repeat_delay=1000)

# ani.save('dynamic_images.mp4')
#ani.save('dynamic_images.mp4')


plt.show()
2 changes: 1 addition & 1 deletion 2 examples/animation/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ def _init_draw(self):
l.set_data([], [])

ani = SubplotAnimation()
# ani.save('test_sub.mp4')
#ani.save('test_sub.mp4')
plt.show()
2 changes: 1 addition & 1 deletion 2 examples/api/custom_projection_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _init_axis(self):
self.yaxis = maxis.YAxis(self)
# Do not register xaxis or yaxis with spines -- as done in
# Axes._init_axis() -- until HammerAxes.xaxis.cla() works.
# self.spines['hammer'].register_axis(self.yaxis)
#self.spines['hammer'].register_axis(self.yaxis)
self._update_transScale()

def cla(self):
Expand Down
2 changes: 1 addition & 1 deletion 2 examples/api/demo_affine_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ def imshow_affine(ax, z, *kl, **kwargs):
im2._image_skew_coordinate = (3, -2)

plt.show()
# plt.savefig("demo_affine_image")
#plt.savefig("demo_affine_image")
4 changes: 2 additions & 2 deletions 4 examples/api/logo2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


axalpha = 0.05
# figcolor = '#EFEFEF'
#figcolor = '#EFEFEF'
figcolor = 'white'
dpi = 80
fig = plt.figure(figsize=(6, 1.1), dpi=dpi)
Expand All @@ -37,7 +37,7 @@ def add_math_background():
(0.35, 0.9), 20))
text.append((r"$\int_{-\infty}^\infty e^{-x^2}dx=\sqrt{\pi}$",
(0.15, 0.3), 25))
# text.append((r"$E = mc^2 = \sqrt{{m_0}^2c^4 + p^2c^2}$",
#text.append((r"$E = mc^2 = \sqrt{{m_0}^2c^4 + p^2c^2}$",
# (0.7, 0.42), 30))
text.append((r"$F_G = G\frac{m_1m_2}{r^2}$",
(0.85, 0.7), 30))
Expand Down
4 changes: 2 additions & 2 deletions 4 examples/axes_grid/demo_axes_grid2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def add_inner_title(ax, title, loc, size=None, **kwargs):
ax.cax.toggle_label(True)
#axis = ax.cax.axis[ax.cax.orientation]
#axis.label.set_text("counts s$^{-1}$")
# axis.label.set_size(10)
# axis.major_ticklabels.set_size(6)
#axis.label.set_size(10)
#axis.major_ticklabels.set_size(6)

# changing the colorbar ticks
grid[1].cax.set_xticks([-1, 0, 1])
Expand Down
10 changes: 5 additions & 5 deletions 10 examples/axes_grid/demo_axes_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def make_cube(r, g, b):
def demo_rgb():
fig, ax = plt.subplots()
ax_r, ax_g, ax_b = make_rgb_axes(ax, pad=0.02)
# fig.add_axes(ax_r)
# fig.add_axes(ax_g)
# fig.add_axes(ax_b)
#fig.add_axes(ax_r)
#fig.add_axes(ax_g)
#fig.add_axes(ax_b)

r, g, b = get_rgb()
im_r, im_g, im_b, im_rgb = make_cube(r, g, b)
Expand All @@ -58,8 +58,8 @@ def demo_rgb():
def demo_rgb2():
fig = plt.figure(2)
ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8], pad=0.0)
# fig.add_axes(ax)
# ax.add_RGB_to_figure()
#fig.add_axes(ax)
#ax.add_RGB_to_figure()

r, g, b = get_rgb()
kwargs = dict(origin="lower", interpolation="nearest")
Expand Down
6 changes: 3 additions & 3 deletions 6 examples/axes_grid/demo_floating_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ def setup_axes3(fig, rect):
ax1, aux_ax2 = setup_axes1(fig, 131)
aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3])

# theta = np.random.rand(10) #*.5*np.pi
# radius = np.random.rand(10) #+1.
# aux_ax1.scatter(theta, radius)
#theta = np.random.rand(10) #*.5*np.pi
#radius = np.random.rand(10) #+1.
#aux_ax1.scatter(theta, radius)

ax2, aux_ax2 = setup_axes2(fig, 132)

Expand Down
2 changes: 1 addition & 1 deletion 2 examples/axes_grid/demo_parasite_axes2.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@
plt.draw()
plt.show()

# plt.savefig("Test")
#plt.savefig("Test")
2 changes: 1 addition & 1 deletion 2 examples/axes_grid/make_room_for_ylabel_using_axesgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
def ex1():
plt.figure(1)
ax = plt.axes([0, 0, 1, 1])
# ax = plt.subplot(111)
#ax = plt.subplot(111)

ax.set_yticks([0.5])
ax.set_yticklabels(["very long label"])
Expand Down
4 changes: 2 additions & 2 deletions 4 examples/axes_grid/scatter_hist.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
# thus there is no need to manually adjust the xlim and ylim of these
# axis.

# axHistx.axis["bottom"].major_ticklabels.set_visible(False)
#axHistx.axis["bottom"].major_ticklabels.set_visible(False)
for tl in axHistx.get_xticklabels():
tl.set_visible(False)
axHistx.set_yticks([0, 50, 100])

# axHisty.axis["left"].major_ticklabels.set_visible(False)
#xHisty.axis["left"].major_ticklabels.set_visible(False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I think this was supposed to be axHisty, not xHisty

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

for tl in axHisty.get_yticklabels():
tl.set_visible(False)
axHisty.set_xticks([0, 50, 100])
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.