Joining points in multi-series seaborn pointplot

霸气de小男生 提交于 2019-12-23 00:51:48

问题


i am having some trouble with a seaborn pointplot.

I am to plot the Temperature vs. growth rate of four kinds of bacteria, so that each type has its own graph, but all four are in the same plot. The thing is, i cannot connect the individual points, i can only get the individual points.

My code:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats, integrate
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import seaborn as sns

dataSorted=data.sort_values(['Temperature','Growth_rate'],ascending=[True,True])
plt.subplots()    
ax2=sns.pointplot(x='Temperature',y='Growth_rate', hue='Bacteria' ,data=dataSorted,scale=0.7,join=True)
axes2=ax2.axes
axes2.set_xlim(10,60)
axes2.set_ylim(0,1.5)
axes2.set_xticks(np.arange(1,7)*10)
axes2.set_xticklabels(np.arange(1,7)*10)

The output is exactly as specified, apart from the lines between points: My plot - without lines I have no idea how to fix this, i have even set the "join" parameter manually, even though it is set as True by default.

来源:https://stackoverflow.com/questions/37857577/joining-points-in-multi-series-seaborn-pointplot

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!