-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Issue #6967 - symlog + minor ticks = exception #8353
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
Update examples/README.txt.
Named Matplotlib module in windows instructions
Pytest documentation + build tweaks
…eebsd Use XDG config path on FreeBSD
Conflicts: .travis.yml keep head version of test matrx examples/pylab_examples/matshow.py whitespace lib/matplotlib/__init__.py conflicts in list of tests, kept master version lib/matplotlib/cm.py conflicts in building reveresd color maps c2daee2 vs 14b47ba Kept version on master, the deprecation warnings only show up in `__getitem__`, not `items`. Kept master version lib/matplotlib/markers.py 98a9347 and 4b7ad54 which are a commit and it's backport. Kept the mater version. lib/matplotlib/tests/test_axes.py - keep test added in 2.0.x, but remove @cleanup, already used bare asserts - discard nose file runner lib/matplotlib/tests/test_image.py - convert added test to pytest - discard nose file runner lib/matplotlib/tests/test_marker.py - convert added test to pytest - discard nose file runner lib/matplotlib/tests/test_patches.py - discard nose file runner - keep tests from master and 2.0.x lib/matplotlib/tests/test_scale.py keep master version (conflicts due to porting the backport of test to nose), same as conflicts in scale.py
[WIP] Tweak coverage
Simplify the implementation of various methods. Note the switch to `np.min` rather than `min`, which avoids silently dropping `nan`s. Switch to modern property declarations. Cleanup some docstrings.
FIX label vertical alignment can now be specified
Cleanup transforms.py.
This makes the result a bit more reproducable and comparable.
Travis may or may not have a browser installed, but AppVeyor definitely does, so this saves a tiny bit of processing power per run.
Before the patch, ``` ec = plt.errorbar([1, 2], [3, 4], [5, 6], capsize=2, fmt="none") print(ec.get_children()) ``` would print `None` (corresponding to the "not drawn" line connecting the data points), two `Line2D` and one `LineCollection`. This patch drops the `None` out, as it is arguably not a child of the Container. (It is still possible to access the individual members of the Container by unpacking it as a tuple.) Also reformat an overly indented piece of code in the vicinity.
Deprecate matplotlib.tests.assert_str_equal.
…-gallery Removes OldScalarFormatter closes #7956
Use neutral pronoun in docs.
DOC added titles to the rest of the 3D plots
…ainment Fix containment test with nonlinear transforms.
Fix check for DISPLAY on PyQt5.
Fix testing with tests.py on Py3.6.
FIX: add __setstate__ function
[MRG+2] DOC api's transition to sphinx-gallery is now complete
Don't index into __builtins__ (not supported by PyPy).
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 appear to have not set your email address before committing. It is some virtual machine name instead of your email address.
lib/matplotlib/tests/test_axes.py
Outdated
# Test for x and y axes both symlog | ||
def test_minorticks_symlog(): | ||
plt.plot([1,2,3,4]) | ||
ax = plt.gca() |
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.
Better to use plt.subplots
.
lib/matplotlib/tests/test_axes.py
Outdated
ax.set_xscale('symlog') | ||
ax.set_yscale('log') | ||
ax.minorticks_on() | ||
|
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.
Remove whitespace.
This looks good to me. Totally optional, but if you're going to fix the first two commits, might I recommend also parametrizing your tests. So instead of the four tests you currently have, I would use one test like this: @pytest.mark.parametrize('xscale', ['symlog', 'log'])
@pytest.mark.parametrize('yscale', ['symlog', 'log'])
def test_minorticks_on(xscale, yscale):
ax = plt.subplot(111)
ax.plot([1, 2, 3, 4]) # note that I'm plotting with `ax`, not `plt`
ax.set_xscale(xscale)
ax.set_yscale(yscale)
ax.minorticks_on() |
Can you fix the email on the first two commits? There's a script in GitHub's help for that. In step 5, make sure that you've only changed these 6 commits from this branch. |
Clearly I've made a mistake while fixing these first 2 commits. I'm going to open a new pull request with the correct information and code. The new revised pull request can be found here: #8367 |
calling minorticks_on() with symlog previously caused an exception. This fix passes a transform object into the SymmetricalLogLocator instead of a float type. Appended tests to verify minorticks_on() works with various combinations of log and symlog. I believe this should solve the issue described in #6967.