Skip to content

Commit 9989c21

Browse files
committed
BUG: Flip StationaryFront orientation (Fixes #3047)
This makes the orientation match that expected by the WPC analyzed fronts, and allows a correct plot to be made with no manual flipping.
1 parent 3515d75 commit 9989c21

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/metpy/plots/patheffects.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,8 @@ def draw_path(self, renderer, gc, path, affine, rgbFace=None): # noqa: N803
844844
class StationaryFront(Front):
845845
"""Draw a stationary front as alternating cold and warm front segments."""
846846

847-
_symbol = WarmFront._symbol
848-
_symbol2 = ColdFront._symbol.transformed(mtransforms.Affine2D().scale(1, -1))
847+
_symbol = WarmFront._symbol.transformed(mtransforms.Affine2D().scale(1, -1))
848+
_symbol2 = ColdFront._symbol
849849

850850
def __init__(self, colors=('red', 'blue'), **kwargs):
851851
"""Initialize a stationary front path effect.
@@ -902,7 +902,7 @@ def draw_path(self, renderer, gc, path, affine, rgbFace=None): # noqa: N803
902902
start_path_inds = np.concatenate([[0], end_path_inds[:-1]])
903903

904904
# Need to account for the line width in order to properly draw symbols at line edge
905-
line_shift = renderer.points_to_pixels(gc.get_linewidth()) / 2
905+
line_shift = -renderer.points_to_pixels(gc.get_linewidth()) / 2
906906

907907
# Loop over all the markers to draw
908908
for ind, start_path, end_path, marker_offset in zip(segment_indices, start_path_inds,
59 Bytes
Loading
-169 Bytes
Loading
25 Bytes
Loading

0 commit comments

Comments
 (0)