python - Scatterplot without linear fit in seaborn -


i wondering if there way turn of linear fit in seaborn's lmplot or if there equivalent function produces scatterplot. sure, use matplotlib, however, find syntax , aesthetics in seaborn quite appealing. e.g,. want plot following plot

import seaborn sns sns.set(style="ticks")  df = sns.load_dataset("anscombe") sns.lmplot("x", "y", data=df, hue='dataset') 

enter image description here

without linear fit so:

from itertools import cycle import numpy np  import matplotlib.pyplot plt  color_gen = cycle(('blue', 'lightgreen', 'red', 'purple', 'gray', 'cyan'))  lab in np.unique(df['dataset']):     plt.scatter(df.loc[df['dataset'] == lab, 'x'],                  df.loc[df['dataset'] == lab, 'y'],                  c=next(color_gen),                 label=lab)  plt.legend(loc='best') 

enter image description here

set fit_reg argument false:

sns.lmplot("x", "y", data=df, hue='dataset', fit_reg=false) 

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -