Commit bfb9cc7
committed
Make cursor text precision actually correspond to pointing precision.
Currently, the cursor text (x=..., y=...) is typically displayed with
much, much more precision than the mouse cursor has (typically, one
pixel); IOW the last digits displayed are typically meaningless.
Make ScalarFormatter.format_data_short convert the inter-pixel distance
to data space and compute the corresponding number of significant digits
to use (and don't drop the final zeroes if any, as they are now, well,
significant).
(A similar change could be applied to other formatters, e.g.
LogFormatter.)1 parent 7540cdd commit bfb9cc7
3 files changed
Lines changed: 51 additions & 3 deletions
File tree
- doc/users/next_whats_new
- lib/matplotlib
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
561 | 571 | | |
562 | 572 | | |
563 | 573 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
587 | 588 | | |
588 | 589 | | |
589 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
590 | 623 | | |
591 | | - | |
592 | 624 | | |
593 | | - | |
594 | | - | |
| 625 | + | |
| 626 | + | |
595 | 627 | | |
596 | 628 | | |
597 | 629 | | |
| |||
0 commit comments