Skip to content

Commit

Permalink
Adjust the TextCollection to convert units appropriately.
Browse files Browse the repository at this point in the history
Resolves issues with Pandas DatetimeIndex.
  • Loading branch information
zbruick committed Aug 21, 2019
1 parent 0f5200e commit 5d1e0ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metpy/plots/_mpl.py
Expand Up @@ -273,7 +273,9 @@ def get_datalim(self, transData): # noqa: N803
"""
full_transform = self.get_transform() - transData
XY = full_transform.transform(np.vstack((self.x, self.y)).T) # noqa: N806
posx = self.convert_xunits(self.x)
posy = self.convert_yunits(self.y)
XY = full_transform.transform(np.vstack((posx, posy)).T) # noqa: N806
bbox = transforms.Bbox.null()
bbox.update_from_data_xy(XY, ignore=True)
return bbox
Expand Down

0 comments on commit 5d1e0ad

Please sign in to comment.