Skip to content

Commit

Permalink
Removed drawing dashed line on top of axis
Browse files Browse the repository at this point in the history
  • Loading branch information
atownse2 committed Jun 7, 2024
1 parent 920e8da commit 9b85455
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/mplhep/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,9 +597,12 @@ def iterable_not_string(arg):

# Draw on all shared axes
for _ax in shared_axes:
_ax.set_xticks(xticks)
_ax.set_xticklabels(xticklabels)
for h in [0, 1]:
_ax.set_xticks(xticks)
_ax.set_xticklabels(xticklabels)
# Don't draw marker on the top of the top axis
if _ax == top_axis and h == 1:
continue

_ax.plot(
[_edges[0], _edges[1]],
Expand All @@ -612,10 +615,6 @@ def iterable_not_string(arg):
clip_on=False,
)

# Don't draw marker on the top of the top axis
if _ax == top_axis and h == 1:
continue

_ax.scatter(
_centers[0],
h,
Expand All @@ -640,9 +639,13 @@ def iterable_not_string(arg):

# Draw on all shared axes
for _ax in shared_axes:
_ax.set_xticks(xticks)
_ax.set_xticklabels(xticklabels)

for h in [0, 1]:
_ax.set_xticks(xticks)
_ax.set_xticklabels(xticklabels)
# Don't draw marker on the top of the top axis
if _ax == top_axis and h == 1:
continue

_ax.plot(
[_edges[-2], _edges[-1]],
Expand All @@ -655,10 +658,6 @@ def iterable_not_string(arg):
clip_on=False,
)

# Don't draw marker on the top of the top axis
if _ax == top_axis and h == 1:
continue

_ax.scatter(
_centers[-1],
h,
Expand Down

0 comments on commit 9b85455

Please sign in to comment.