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

Skip to content

backend_pgf: \pgftext now requires \color inside argument (fix #3779) [backport to 1.4.x] #3780

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 2 commits into from
Nov 11, 2014

Conversation

pwuertz
Copy link
Contributor

@pwuertz pwuertz commented Nov 11, 2014

On systems using TeX Live 2014 \pgftext doesn't handle text color the same way as before. Add \color command inside the text argument to adapt to this new behaviour.

@tacaswell tacaswell changed the title backend_pgf: \pgftext now requires \color inside argument (fix #3779) backend_pgf: \pgftext now requires \color inside argument (fix #3779) [backport to 1.4.x] Nov 11, 2014
@@ -638,7 +638,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
# prepare string for tex
s = common_texification(s)
prop_cmds = _font_properties_str(prop)
s = r"{%s %s}" % (prop_cmds, s)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know almost nothing about pgf, but dropping the {} smells funny....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was redundant because in the end s is embedded into \pgftext[%s]{%s}.

@tacaswell tacaswell added this to the v1.4.3 milestone Nov 11, 2014
@jenshnielsen
Copy link
Member

Looks fine to me. Should we add a pgf test with coloured text. I know travis can't run it but it might still be useful?

tacaswell added a commit that referenced this pull request Nov 11, 2014
BUG : backend_pgf: \pgftext now requires \color inside argument (fix #3779) [backport to 1.4.x]
@tacaswell tacaswell merged commit 1ae817a into matplotlib:master Nov 11, 2014
tacaswell added a commit that referenced this pull request Nov 11, 2014
BUG : backend_pgf: \pgftext now requires \color inside argument (fix #3779) [backport to 1.4.x]
@tacaswell
Copy link
Member

cherry-picked as c31ffe8

@pwuertz pwuertz deleted the fix_3779 branch July 9, 2015 13:54
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.

4 participants