X Tutup
Skip to content

Add a 'useMathText' param to method 'ticklabel_format'#6337

Merged
tacaswell merged 3 commits intomatplotlib:masterfrom
gepcel:useMathText
Apr 29, 2016
Merged

Add a 'useMathText' param to method 'ticklabel_format'#6337
tacaswell merged 3 commits intomatplotlib:masterfrom
gepcel:useMathText

Conversation

@gepcel
Copy link
Copy Markdown
Contributor

@gepcel gepcel commented Apr 26, 2016

As discussed in #6330. Can anyone examine this?

@gepcel
Copy link
Copy Markdown
Contributor Author

gepcel commented Apr 26, 2016

Now we can do like:

plt.plot(1, 10000, 2, 20000, 'ro')
ax = plt.gca()
ax.ticklabel_format(scilimits=(-3, 3), useMathText=True)
plt.show()

or:

plt.plot(1, 10000, 2, 20000, 'ro')
ax = plt.gca()
fmt = ax.yaxis.get_major_formatter()
fmt.set_useMathText(True)
#or fmt.useMathText = True
fmt.set_powerlimits((-3, 3))
plt.show()

Add and remove some whitespace.
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Apr 26, 2016

It would be nice to be more PEP8-y on the name, but I don't know if we want to just leave it to be consistent with the existing name. Or perhaps some deprecation notice would be possible on the original name...

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Apr 26, 2016
add more whitespaces to fix a malformed table.
Text in column margin.
@gepcel
Copy link
Copy Markdown
Contributor Author

gepcel commented Apr 27, 2016

Hi, @QuLogic . I'm not sure I understand you. Can you explain more? What should I do?

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Apr 27, 2016

The comment is not a suggestion for you; it's a question for the other devs.

@tacaswell
Copy link
Copy Markdown
Member

making the names more pythonic is a good fight, but one that is beyond the scope of this PR. I think the standard practice in these cases is to stay consistent with the local naming and do the renaming/deprecation in a separate PR.

@tacaswell tacaswell merged commit 094007f into matplotlib:master Apr 29, 2016
@gepcel gepcel deleted the useMathText branch April 28, 2017 02:44
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

X Tutup