Skip to content
Prev Previous commit
Next Next commit
moved import to top
  • Loading branch information
noatamir committed Jun 14, 2022
commit db9401b4d901a057d0f107f6d0a3f3c949dd17b6
4 changes: 1 addition & 3 deletions pandas/tests/plotting/test_misc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
""" Test cases for misc plot functions """

from matplotlib.text import Text
import numpy as np
import pytest

Expand Down Expand Up @@ -446,7 +447,6 @@ def test_dictionary_color(self):
def test_bar_plot(self):
# GH38947
# Test bar plot with string and int index
from matplotlib.text import Text

expected = [Text(0, 0, "0"), Text(1, 0, "Total")]

Expand All @@ -465,7 +465,6 @@ def test_bar_plot(self):
def test_barh_plot_labels_mixed_integer_string(self):
# GH39126
# Test barh plot with string and integer at the same column
from matplotlib.text import Text

df = DataFrame([{"word": 1, "value": 0}, {"word": "knowledg", "value": 2}])
plot_barh = df.plot.barh(x="word", legend=None)
Expand Down Expand Up @@ -602,7 +601,6 @@ def test_plot_bar_axis_units_timestamp_conversion(self):
def test_bar_plt_xaxis_intervalrange(self):
# GH 38969
# Ensure IntervalIndex x-axis produces a bar plot as expected
from matplotlib.text import Text

expected = [Text(0, 0, "([0, 1],)"), Text(1, 0, "([1, 2],)")]
s = Series(
Expand Down