Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8658721

Browse filesBrowse files
committed
Merge pull request #6253 from madphysicist/ticker-formatter-maint
MAINT: Updates to formatters in `matplotlib.ticker`
2 parents 8af02b3 + 29b2ea6 commit 8658721
Copy full SHA for 8658721

File tree

Expand file treeCollapse file tree

3 files changed

+194
-90
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+194
-90
lines changed

‎.mailmap

Copy file name to clipboardExpand all lines: .mailmap
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ John Hunter <jdh2358@gmail.com>
2828
Jorrit Wronski <jowr@mek.dtu.dk>
2929
Jouni K. Seppänen <jks@iki.fi>
3030
Joseph Fox-Rabinovitz <jfoxrabinovitz@gmail.com> Mad Physicist <madphysicist@users.noreply.github.com>
31+
Joseph Fox-Rabinovitz <jfoxrabinovitz@gmail.com> Joseph Fox-Rabinovitz <joseph.r.fox-rabinovitz@nasa.gov>
3132
Julien Schueller <julien.schueller@gmail.com> <schueller@porsche-l64.phimeca.lan>
3233
Julien Schueller <julien.schueller@gmail.com> <schueller@bx-l64.phimeca.lan>
3334
Kevin Davies <kdavies4@gmail.com> <daviesk24@yahoo.com>

‎lib/matplotlib/tests/test_ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_ticker.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,10 @@ def _percent_format_helper(xmax, decimals, symbol, x, display_range, expected):
371371
formatter = mticker.PercentFormatter(xmax, decimals, symbol)
372372
nose.tools.assert_equal(formatter.format_pct(x, display_range), expected)
373373

374+
# test str.format() style formatter with `pos`
375+
tmp_form = mticker.StrMethodFormatter('{x:03d}-{pos:02d}')
376+
nose.tools.assert_equal('002-01', tmp_form(2, 1))
377+
374378

375379
def test_percentformatter():
376380
test_cases = (

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.