Skip to content

Commit

Permalink
DOC: Clarify how to derive dodge parameter value for aligning pointpl…
Browse files Browse the repository at this point in the history
…ot in stripplot (#2548)

* DOC: clarify how to derive value for dodge param

* DOC: fix typo develpoment -> development
  • Loading branch information
sappelhoff authored Apr 14, 2021
1 parent 576db3c commit 66b4783
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Because matplotlib handles the actual rendering, errors or incorrect outputs may
New features
------------

If you think there is a new feature that should be added to seaborn, you can open an issue to discuss it. But please be aware that current development efforts are mostly focused on standardizing the API and internals, and there may be relatively low enthusiasm for novel features that do not fit well into short- and medium-term develpoment plans.
If you think there is a new feature that should be added to seaborn, you can open an issue to discuss it. But please be aware that current development efforts are mostly focused on standardizing the API and internals, and there may be relatively low enthusiasm for novel features that do not fit well into short- and medium-term development plans.
9 changes: 6 additions & 3 deletions examples/jitter_stripplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@
sns.stripplot(x="value", y="measurement", hue="species",
data=iris, dodge=True, alpha=.25, zorder=1)

# Show the conditional means
# Show the conditional means, aligning each pointplot in the
# center of the strips by adjusting the width allotted to each
# category (.8 by default) by the number of hue levels
sns.pointplot(x="value", y="measurement", hue="species",
data=iris, dodge=.532, join=False, palette="dark",
data=iris, dodge=.8 - .8 / 3,
join=False, palette="dark",
markers="d", scale=.75, ci=None)

# Improve the legend
# Improve the legend
handles, labels = ax.get_legend_handles_labels()
ax.legend(handles[3:], labels[3:], title="species",
handletextpad=0, columnspacing=1,
Expand Down

0 comments on commit 66b4783

Please sign in to comment.