Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Stackplot weighted_wiggle zero-area fix #6358

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 3 commits into from
May 16, 2016

Conversation

egpbos
Copy link
Contributor

@egpbos egpbos commented May 1, 2016

See #6313.

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone May 1, 2016
@tacaswell
Copy link
Member

Can you force-push just the first commit (with out the merge from master)?

Can you also add an image test that exercises this condition? It might be best to modify the test data in test_axes.test_stackplot_baseline and update the expected images.

Other wise 👍

@egpbos egpbos force-pushed the stackplot_6313 branch from f7f18c4 to 506df7b Compare May 3, 2016 05:04
@egpbos
Copy link
Contributor Author

egpbos commented May 3, 2016

Force push done.

@tacaswell
Copy link
Member

Will you have time to add a test for this?

@egpbos
Copy link
Contributor Author

egpbos commented May 8, 2016

I'm trying, but I'm running on OSX in a Conda virtual environment, so having issues with that. The frameworkpython method doesn't seem to work for me, and I don't have that much time, unfortunately. Any ideas on getting my venv working?

@egpbos
Copy link
Contributor Author

egpbos commented May 8, 2016

Just to be sure this makes sense, what I'd do is simply add

    d[50,:] = 0  # test for fixed weighted wiggle (issue #6313)

after line 1394 in matplotlib/tests/test_axis.py. To generate the baseline image, I have this script, but that's the one that won't run in my venv, so that's where I'm stuck.

@efiring
Copy link
Member

efiring commented May 8, 2016

Others might have better methods, but here is what I do to develop mpl from within a conda environment on OSX:

  1. Use conda to make a test environment with the desired python version, and use conda to install matplotlib in it.
  2. Use conda to uninstall matplotlib.
  3. In my github clone of matplotlib, make a feature branch, and make the desired changes to it.
  4. In the root of that clone directory, 'pip install .'
  5. In a directory somewhere away from the cloned directory, to run your particular modified test, run:
    [path_to_matplotlib]/tests.py matplotlib.tests.test_axis.test_stackplot_baseline
  6. If everything worked as desired, copy the result images from the new result_images subdirectory of your testing directory to the appropriate baseline_images location in the repo, git commit everything, and push. If it didn't work, then modify the code, run 'pip uninstall matplotlib', and go back to 4.

@egpbos
Copy link
Contributor Author

egpbos commented May 13, 2016

@efiring Awesome, that did the trick, thanks! Well, almost, I had to combine it with this pythonw/python.app tip. Perhaps an idea to put this method in the documentation? I assume steps 1 and 2 are to automatically install dependencies, right? Anyway, will try to generate the test images using this setup asap.

@egpbos
Copy link
Contributor Author

egpbos commented May 15, 2016

Ok, forgot to add matplotlib.style.use('classic') to the image generation script, that seems to fix the tests. By the way, is there a developers guide with info like this?

@egpbos
Copy link
Contributor Author

egpbos commented May 16, 2016

@tacaswell: matplotlib.tests.test_mlab.rec2txt_testcase is failing in AppVeyor. Does that have anything to do with stackplot / this PR?

@tacaswell
Copy link
Member

No, that is a separate issue.

@tacaswell tacaswell merged commit 60731eb into matplotlib:master May 16, 2016
tacaswell added a commit that referenced this pull request May 16, 2016
FIX: Stackplot weighted_wiggle zero-area
@tacaswell
Copy link
Member

Thanks! I think this is your first contribution to the mpl source. Congratulations and hope we hear from you again.

Backported to v2.x as 102872a

@QuLogic QuLogic modified the milestones: 2.0 (style change major release), 2.0.1 (next bug fix release) May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants