File tree 1 file changed +7
-6
lines changed 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 4
4
from datetime import datetime
5
5
from typing import Any , Dict , Union
6
6
7
- import matplotlib
8
-
9
7
import numpy as np
10
8
import pandas as pd
11
9
import pytest
@@ -2670,11 +2668,14 @@ def setUp(self):
2670
2668
2671
2669
def test_datetime_line_plot (self ):
2672
2670
# test if line plot raises no Exception
2671
+ self .darray .plot .line ()
2672
+
2673
+ def test_datetime_units (self ):
2674
+ # test that matplotlib-native datetime works:
2673
2675
fig , ax = plt .subplots ()
2674
- self .darray .plot .line (ax = ax )
2675
- # check that motplotlib's datetlocator has been chosen
2676
- loc = ax .xaxis .get_major_locator ()
2677
- assert isinstance (loc , matplotlib .dates .AutoDateLocator )
2676
+ ax .plot (self .darray ['time' ], self .darray )
2677
+ assert isinstance (ax .xaxis .get_major_locator (),
2678
+ mpl .dates .AutoDateLocator )
2678
2679
2679
2680
2680
2681
@pytest .mark .filterwarnings ("ignore:setting an array element with a sequence" )
You can’t perform that action at this time.
0 commit comments