seaborn

Tweaking seaborn.boxplot

落爺英雄遲暮 提交于 2019-12-31 08:54:07
问题 I would like to compare a set of distributions of scores ( score ), grouped by some categories ( centrality ) and colored by some other ( model ). I've tried the following with seaborn: plt.figure(figsize=(14,6)) seaborn.boxplot(x="centrality", y="score", hue="model", data=data, palette=seaborn.color_palette("husl", len(models) +1)) seaborn.despine(offset=10, trim=True) plt.savefig("/home/i11/staudt/Eval/properties-replication-test.pdf", bbox_inches="tight") There are some problems I have

Tweaking seaborn.boxplot

孤者浪人 提交于 2019-12-31 08:52:06
问题 I would like to compare a set of distributions of scores ( score ), grouped by some categories ( centrality ) and colored by some other ( model ). I've tried the following with seaborn: plt.figure(figsize=(14,6)) seaborn.boxplot(x="centrality", y="score", hue="model", data=data, palette=seaborn.color_palette("husl", len(models) +1)) seaborn.despine(offset=10, trim=True) plt.savefig("/home/i11/staudt/Eval/properties-replication-test.pdf", bbox_inches="tight") There are some problems I have

Fine control over the font size in Seaborn plots for academic papers

六眼飞鱼酱① 提交于 2019-12-31 08:24:13
问题 I'm currently trying to use Seaborn to create plots for my academic papers. The plots look great and easy to generate, but one problem that I'm having some trouble with is having the fine control on the font size in the plots. My font size in my paper is 9pt and I would like to make sure the font size in my plots are either 9pt or 10pt. But in seaborn, the font size is mainly controlled through font scale sns.set_context("paper", font_scale=0.9) . So it's hard for me to find the right font

Fine control over the font size in Seaborn plots for academic papers

元气小坏坏 提交于 2019-12-31 08:21:47
问题 I'm currently trying to use Seaborn to create plots for my academic papers. The plots look great and easy to generate, but one problem that I'm having some trouble with is having the fine control on the font size in the plots. My font size in my paper is 9pt and I would like to make sure the font size in my plots are either 9pt or 10pt. But in seaborn, the font size is mainly controlled through font scale sns.set_context("paper", font_scale=0.9) . So it's hard for me to find the right font

Put variable names on diagonal of Seaborn PairGrid

两盒软妹~` 提交于 2019-12-31 05:27:25
问题 How can I put variable names on the diagonal of a Seaborn PairGrid , like this from the PerformanceAnalytics R package's chart.Correlation function? I imagine this involves a custom function to pass to map_diag , but don't know how to extract variable names for it. For example, this shows the entire array: import matplotlib.pyplot as plt import seaborn as sns iris = sns.load_dataset('iris') def diagfunc(x, **kws): ax = plt.gca() ax.annotate(x, xy=(.1, .9), xycoords=ax.transAxes) sns.PairGrid

python/matplotlib/seaborn- boxplot on an x axis with data points

你。 提交于 2019-12-31 03:41:07
问题 My data set is like this: a python list with 6 numbers [23948.30, 23946.20, 23961.20, 23971.70, 23956.30, 23987.30] I want them to be be a horizontal box plot above an x axis with[23855 and 24472] as the limit of the x axis (with no y axis). The x axis will also contain points in the data. (so the box plot and x axis have the same scale) I also want the box plot show the mean number in picture. Now I can only get the horizontal box plot. (And I also want the x-axis show the whole number

Prevent scientific notation in seaborn boxplot

╄→尐↘猪︶ㄣ 提交于 2019-12-31 02:01:27
问题 I'm using pandas version 0.17.0 , matplotlib version 1.4.3 and seaborn version 0.6.0 to create a boxplot. I want all values on the x-axis in float notation. Currently the two smallest values (0,00001 and 0,00005) are formatted in scientific notation. Here's the code I use to plot the image: import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data = pd.read_csv("resultsFinal2.csv") boxplot = sns.boxplot(x="Regularisierungsparameter", y="F1", data=data.sort(

python - seaborn: share X label not working as expected

佐手、 提交于 2019-12-30 07:48:14
问题 i am dealing with a dataset that shows relationships between two points, such as bus stops. For example, we have bus stops A, B, C, and D. I want to make histogram plot that shows, for each bus stop, how long it takes to get to the other 3 bus stops. Obviously, there is no time from A to A, therefore, that should be blank. When I plot it, I see that the first row shows B C D, the second row shows A, C, D, etc. The columns are misaligned and the colors don't represent the same column in each

Seaborn countplot set legend for x values

六眼飞鱼酱① 提交于 2019-12-30 07:00:47
问题 I'm ploting a categorical data and value count by sns.countplot() I'm trying to add legend for x-values to the figure as following: handles is set of x-value, labels is the descriptions of x-values. ax = sns.countplot(x = df.GARAGE_DOM) handles, labels = ax.get_legend_handles_labels() handles = ["VP", "BC", "GC", "GP", "JC", "PO"] labels = ["Voie Publique", "box", "Garage couvert", "garage particulier clos", "Jardin clos", "parking ouvert"] by_label = OrderedDict(zip(handles,labels)) ax

Getting legend in seaborn jointplot

瘦欲@ 提交于 2019-12-30 04:06:06
问题 I'm interested in using the seaborn joint plot for visualizing correlation between two numpy arrays. I like the visual distinction that the kind='hex' parameter gives, but I would also like to know the actual count that different shades correspond to. Does anyone know how to put this legend on the side or even on the plot? I tried looking at the documentation and couldn't find it. Thanks! 回答1: EDIT: updated to work with new Seaborn ver. You need to do it manually by making a new axis with add