Reputation: 333
Seaborn factor plots are fantastic but how do I influence line style (e.g. dashed etc for better b/w readability). And how do I apply "x_jitter" so the different confidence intervals don't occlude each other? Thanks!
Here is an example that does not have those changes applied.
>>> import seaborn as sns
>>> sns.set(style="ticks")
>>> exercise = sns.load_dataset("exercise")
>>> g = sns.factorplot(x="time", y="pulse", hue="kind", data=exercise)
Upvotes: 3
Views: 1728
Reputation: 49064
Brief explanation to make sure that the complete solution is included, not just the links.
sns.factorplot
forwards additional arguments to the underlying plotting function. In your example, sns.pointplot
is used to plot the data and you can pass the arguments linewidths
and dodge
to this function:
sns.factorplot(x="time", y="pulse", hue="kind", data=exercise, dodge=0.2, linestyles='dashed')
Upvotes: 1