You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-line text instances differing in linespacing not rendered correctly #7523
goal: display 2-line texts which differ by linespacing.
issue: when the text instances have the same parameters (coordinates, text string, alpha) except for the linespacing, the second one is displayed over the first one. The linespacing of the first instance is used for the second instance as well.
This is a really easy fix; one needs to add self._linespacing to matplotlib.text.Text.get_prop_tup, but it needs tests, etc., which I don't have time for at the moment, so tagging new-contributor-friendly.
I am trying to try out how to test functions in matplotlib. I ran the sample test on the documentation:
python tests.py "matplotlib.tests.test_simplification:test_clipping"
but got the following error:
Python byte-compilation optimization level: 0
Traceback (most recent call last):
File "tests.py", line 46, in <module>
success = test(argv=sys.argv[0:1] + extra_args, switch_backend_warn=False)
TypeError: test() got an unexpected keyword argument 'argv'
I am not sure how to proceed if I can't test my changes.
can you describe your setup a little further?
(e.g., how up-to-date is your source branch? are you using virtual or conda environments? which version of python? how did you install your development version of matplotlib?)
I solved the issue I mentioned above but am running into another issue:
Whenever I run the test, I get the following error, causing tests that compares against images to fail:
UserWarning: matplotlib is not built with the correct FreeType version to run tests. Set
local_freetype=True in setup.cfg and rebuild. Expect many image comparison failures below.
Expected freetype version 2.7.0. Found freetype version 2.6.1. Freetype build type is not local
I pulled from the master branch from github a couple of hours ago, so it should be the latest version. I just pulled again to confirm.
From the package, I ran python setup.py develop.
I am using the base version of python installed by brew. My current version is Python 2.7.10.
I renamed setup.cfg.template to setup.cfg and uncommented:
If you installed, changed the config, and then installed again, it may still be re-using the objects built and linked from the first install. The python builder is smart, but not that smart.
Activity
QuLogic commentedon Nov 29, 2016
This is a really easy fix; one needs to add
self._linespacingtomatplotlib.text.Text.get_prop_tup, but it needs tests, etc., which I don't have time for at the moment, so tagging new-contributor-friendly.vincentpham1991 commentedon Dec 7, 2016
Can I take a crack at this? I would like to contribute to matplotlib.
QuLogic commentedon Dec 7, 2016
Sure, no need to ask, just follow the changes that I outlined and open a PR.
vincentpham1991 commentedon Dec 8, 2016
I am trying to try out how to test functions in matplotlib. I ran the sample test on the documentation:
python tests.py "matplotlib.tests.test_simplification:test_clipping"
but got the following error:
I am not sure how to proceed if I can't test my changes.
phobson commentedon Dec 8, 2016
@vincentpham1991 what OS/platform are you on?
vincentpham1991 commentedon Dec 8, 2016
I am using Mac OS 10.11.6
phobson commentedon Dec 8, 2016
can you describe your setup a little further?
(e.g., how up-to-date is your source branch? are you using virtual or conda environments? which version of python? how did you install your development version of matplotlib?)
vincentpham1991 commentedon Dec 8, 2016
I solved the issue I mentioned above but am running into another issue:
Whenever I run the test, I get the following error, causing tests that compares against images to fail:
I pulled from the master branch from github a couple of hours ago, so it should be the latest version. I just pulled again to confirm.
From the package, I ran python setup.py develop.
I am using the base version of python installed by brew. My current version is Python 2.7.10.
I renamed setup.cfg.template to setup.cfg and uncommented:
As well as:
QuLogic commentedon Dec 8, 2016
Make sure to change
setup.cfgbefore runningpython setup.py develop(though I preferpip install -e .).vincentpham1991 commentedon Dec 8, 2016
Yes, I made the change to setup.cfg before running the setup.
tacaswell commentedon Dec 8, 2016
If you installed, changed the config, and then installed again, it may still be re-using the objects built and linked from the first install. The python builder is smart, but not that smart.
See http://matplotlib.org/devdocs/devel/contributing.html#retrieving-and-installing-the-latest-version-of-the-code
fix issue matplotlib#7523
Fixed issue matplotlib#7523 and added tests for it.