-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fixed example axes_grid demo_axes_rgb.py figure 1 #6759
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
Conversation
made axes ticks invisible by setting tick_params for figure 1
Travis failure is the fixed PEP8 error in test svg. |
Is this still a work in progress? I would also make a tiny tweak to the comment that we are making the tick_mark_ invisible. A tick is a location in matplotlib parlance. |
@@ -49,6 +49,13 @@ def demo_rgb(): | |||
r, g, b = get_rgb() | |||
im_r, im_g, im_b, im_rgb = make_cube(r, g, b) | |||
kwargs = dict(origin="lower", interpolation="nearest") | |||
|
|||
#make ticks invisible |
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.
Missing space after #
.
Fixing a typo and description in the comment line (making tickmarks invisible, not ticks)
OK fixing the typo and description in the comment line. The tickmarks in Fig 2 still look a little strange- I haven't found an easy fix but will take another look. |
As part of the tests we check the code with the tool formerly known as pep8. While this is sometimes annoying, it helps to keep the style in the codebase consistent (which is a big help for a large project with lots of contributors). It looks like you have a line someplace which is empty but has white space in it
Can you post an image of what it looks like now? |
…hash in comment lines)
I think you need to change the tick direction via http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.tick_params |
Why does the blue channel only have two ticks, though? On Tue, Jul 19, 2016 at 9:46 PM, Thomas A Caswell notifications@github.com
|
Setting tickmark direction to "in" for both axes Setting the ticks explicitly to fix the problem with the major ticks in the blue plot
#fig.add_axes(ax_b) | ||
# fig.add_axes(ax_r) | ||
# fig.add_axes(ax_g) | ||
# fig.add_axes(ax_b) |
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.
Is there any reason to leave these commented lines in?
The problem with the ticks is revealing an underlying problem in axes_grid1. I suspect a |
tick.tick2line.set_mec("w") | ||
ax1.tick_params(axis='both', direction='in') | ||
ax1.xaxis.set_ticks(np.arange(0, 12, 2)) | ||
ax1.yaxis.set_ticks(np.arange(0, 12, 2)) |
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.
You can take the two tick-setters outside the loop and apply them to ax.RGB
(or any one of the 4). There is no telling how long it will take before the underlying bug is found and fixed, so this is a reasonable workaround in the interim. In addition, once the bug is fixed, the automatically-located ticks will be based on the small ax.B
so there will be fewer of them than you want.
I've bumped this to 2.0.1, but reading the discussion I see it may underline a more profound problems with the ticks. |
made axes ticks invisible by setting tick_params for figure 1