Skip to content

Commit a048535

Browse files
committed
Fix plotting of categorical histogram bar x ticks not in middle
1 parent 6cadc06 commit a048535

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ert/gui/tools/plot/plottery/plots/histogram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def _plotCategoricalHistogram(
163163
counts = data.value_counts()
164164
freq = [counts.get(category, 0) for category in categories]
165165
pos = np.arange(len(categories))
166-
width = 1.0
167-
axes.set_xticks(pos + (width / 2.0))
166+
width = 0.95
167+
axes.set_xticks(pos)
168168
axes.set_xticklabels(categories)
169169

170170
axes.bar(pos, freq, alpha=style.alpha, color=style.color, width=width)

0 commit comments

Comments
 (0)