-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Style changes omnibus PR #5774
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
Style changes omnibus PR #5774
Changes from 1 commit
14281fd
76c70be
bba003f
86b7a59
d2f6bea
87ba8b0
38d4e31
5317d35
5695389
3e7471a
28c632f
4472125
f45e9bc
4513182
09b29d8
3abcb95
f2ac1bb
318a044
417db2f
82558ee
c5864ce
30b4341
0f4e3a6
c44bd3d
fa4c56e
caa711b
c2580a5
f0e98fa
7718b15
0aae0f0
f21d5cf
31f28bc
b394ae7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,10 @@ | |
|
||
for i, gamma in enumerate(gammas): | ||
plt.subplot(xgrid, ygrid, i + 2) | ||
plt.title('Power law normalization\n$(\gamma=%1.1f)$' % gamma) | ||
plt.title('Power law\n$(\gamma=%1.1f)$' % gamma) | ||
plt.hist2d(data[:, 0], data[:, 1], | ||
bins=100, norm=mcolors.PowerNorm(gamma)) | ||
|
||
plt.subplots_adjust(hspace=0.39) | ||
plt.subplots_adjust(hspace=0.8) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uhm, that's a lot of space... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but it's required to make room for the text. I suppose I could use tight_layout instead... that seems to work and it less "tweaky". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think tight_layout makes more sense, too. Should probably consider it in more places, too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than calling |
||
plt.savefig("test.png") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change seems unnecessary. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean just the saving, not the spacing change, right? I agree about the saving -- I think that's just left in accidentally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, just the saving. |
||
plt.show() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,6 @@ | |
fig = plt.figure() | ||
ax = fig.gca(projection='3d') | ||
|
||
ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2) | ||
ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2, antialiased=True) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should probably get rid of the use of Jet here. Also, isn't antialiasing turned on by default? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. antialiasing is turned off on pcolormesh by default to get around the polygon edge gap problem. I'll just take the explicit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, right. Because we are taking the edges off of the polygons, the gaps would be apparent. How about we make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not a change in behavior. pcolormesh has had no borders and antialiased=False for a long time. I don't think it makes sense to change that. The change here is just that it happens to look better with the new colormap on this specific data so why not? |
||
|
||
plt.show() |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ | |
|
||
t = np.arange(0.0, 5.0, 0.01) | ||
s = np.cos(2*np.pi*t) | ||
line, = ax.plot(t, s, lw=3, color='purple') | ||
line, = ax.plot(t, s, lw=3) | ||
|
||
ax.annotate('axes center', xy=(.5, .5), xycoords='axes fraction', | ||
horizontalalignment='center', verticalalignment='center') | ||
|
@@ -97,7 +97,7 @@ | |
ax = fig.add_subplot(111, projection='polar') | ||
r = np.arange(0, 1, 0.001) | ||
theta = 2*2*np.pi*r | ||
line, = ax.plot(theta, r, color='#ee8d18', lw=3) | ||
line, = ax.plot(theta, r) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The linewidth was kept in the previous plot call, why not here, too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should probably take it off in both cases, actually, so it will take the new defaults. (This example isn't about how to change the linewidth). |
||
|
||
ind = 800 | ||
thisr, thistheta = r[ind], theta[ind] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like some sort of suggested change that people should make, but it isn't noted in the change list above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I'll add this to the existing bullet point about limits.