Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

partial fix for issue #7712#8251

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ParagBh wants to merge1 commit intomatplotlib:masterfromParagBh:parag-issue-7712
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletionslib/matplotlib/dates.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -927,7 +927,7 @@ def __init__(self, tz=None, minticks=5, maxticks=None,
YEARLY : [1, 2, 4, 5, 10, 20, 40, 50, 100, 200, 400, 500,
1000, 2000, 4000, 5000, 10000],
MONTHLY : [1, 2, 3, 4, 6],
DAILY : [1, 2, 3, 7, 14],
DAILY : [1, 2, 3, 7, 14, 21],
HOURLY : [1, 2, 3, 4, 6, 12],
MINUTELY: [1, 5, 10, 15, 30],
SECONDLY: [1, 5, 10, 15, 30],
Expand All@@ -951,7 +951,7 @@ def __init__(self, tz=None, minticks=5, maxticks=None,
SECONDLY, MICROSECONDLY]
self.minticks = minticks

self.maxticks = {YEARLY: 11, MONTHLY:12, DAILY:11, HOURLY: 12,
self.maxticks = {YEARLY: 11, MONTHLY:8, DAILY:6, HOURLY: 12,
MINUTELY: 11, SECONDLY: 11, MICROSECONDLY: 8}
if maxticks is not None:
try:
Expand Down
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletionslib/matplotlib/tests/test_dates.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -467,3 +467,12 @@ def test_DayLocator():
def test_tz_utc():
dt = datetime.datetime(1970, 1, 1, tzinfo=mdates.UTC)
dt.tzname()


@image_comparison(baseline_images=['date_no_tick_overlap.png'],
extensions=['png'])
def test_datetime_tick_overlap():
#test issue 7712
dates = [datetime.datetime(2017,1,i) for i in range(1,30)]
values = list(range(1,30))
plt.plot(dates, values)

[8]ページ先頭

©2009-2025 Movatter.jp