Skip to content
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

Text.{get,set}_usetex: manually enable/disable TeX #3925

Merged
merged 1 commit into from Dec 24, 2014
Merged

Text.{get,set}_usetex: manually enable/disable TeX #3925

merged 1 commit into from Dec 24, 2014

Conversation

duncanmmacleod
Copy link
Contributor

On some machines with slow TeX rendering, it might be useful to be able to disable usetex for specific matplotlib.text.Text objects.

My specific use-case is running a live data Animation on a slow, old machine, with TeX rendering for all labels and ticks, but disabling it for the time-stamp that updates every second - meaning dvipng isn't getting called continuously. Might be useful in other cases.

    - defaults to rcParams['text.usetex']
    - useful for, e.g, timestamps for Animations on machines with slow TeX
      rendering
@mdboom
Copy link
Member

mdboom commented Dec 17, 2014

Seems fine to me. This needs a test and a what's new entry.

@tacaswell tacaswell added this to the v1.5.x milestone Dec 18, 2014
@tacaswell
Copy link
Member

Interesting, this is a late binding default look up rather than an early-binding (like color).....

@mdboom I remember we talked about this, and that you convinced me that this was a good idea, but I don't remember why.

@mdboom
Copy link
Member

mdboom commented Dec 18, 2014

@tacaswell: I remember the discussion in question, but don't quite remember how I arrived at my conclusion either. The current behavior of late binding is helpful for running one way interactively and another way for producing hard copy, I suppose.

In any event, I think this change is fine and it doesn't look like it changes existing behavior, which is a plus.

@tacaswell
Copy link
Member

@duncanmmacleod Can you add an entry in https://github.com/matplotlib/matplotlib/tree/master/doc/users/whats_new to advertise this new feature?

@duncanmmacleod
Copy link
Contributor Author

@tacaswell, yes I can - sorry guys, I've been travelling back to the UK for the holidays, will try and get things finished before the New Year.

@tacaswell
Copy link
Member

@duncanmmacleod Would you be offended if I just went ahead and did it?

@duncanmmacleod
Copy link
Contributor Author

@tacaswell, not at all.

@tacaswell tacaswell merged commit 6b03c54 into matplotlib:master Dec 24, 2014
tacaswell added a commit that referenced this pull request Dec 24, 2014
ENH : artist-level usetex control
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.

None yet

3 participants