0

I'm trying to use Seaborn to plot two curves that shouldn't overlap perfectly. The blue curve in this example should be defined from 2 to 8, and the red line should be defined from 1 to 7, so they should appear slightly staggered. However, sns.pointplot draws both curves as if they overlapped perfectly. Here is the most minimal code I used to generate my plot:

g = sns.FacetGrid(myDF, col = 'condition', hue = 'manipulation', 
                 col_order = ['condition1', 'condition2', 'condition3'])
g.map(sns.pointplot, 'ordinalIV', 'continuousDV', **{'x_estimator': np.mean})

Is there any way to shift these curves, so that they don't overlap? This issue seems similar to my problem, but I want to keep the bootstrapped confidence intervals in my plot, so I'm not sure how to re-create that. If anyone knows of a workaround to (1) compute bootstrapped confidence intervals outside of seaborn and (2) add them to a matplotlib plot, that would work too!

cogs
  • 9
  • Am I missing something? The blue and red curves in your [example](https://user-images.githubusercontent.com/9062288/28391791-3d6246bc-6c94-11e7-82c7-8903477fda94.png) do not seem to "overlapped perfectly". Can you provide a [MCVE](https://stackoverflow.com/help/mcve)? Are you trying to say `sns.pointplot` got your plot wrong (blue curve is not from 2 to 8)? Without a sample data, it's difficult for us to help. – Y. Luo Jul 20 '17 at 03:29
  • 2
    You should use factorplot here. – mwaskom Jul 20 '17 at 13:31
  • Can you provide an example data set that reproduces this problem? – joelostblom Oct 21 '17 at 14:02

0 Answers0