boxplot

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

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

How to change panel labels and x-axis sublabels in a lattice bwplot

五迷三道 提交于 2019-12-30 17:57:10
问题 I'm 2 weeks into using RStudio (MacOS) so please forgive me if I'm overlooking an obvious function that would solve my problem. As a project, I am attempting to reproduce a box plot graph with 4 plots representing Net Benefit, given disease type -- "non-severe"(0) or "severe"(1) -- as an x-axis label, and given treatment -- "talk therapy"(0) or "drug therapy"(1) -- as an x-axis sub-label. Here is my script so far: tx <- c(0,0,0,0,1,1,1,1) dztype <- c(1,0,1,0,0,0,1,1) NBwtp1000 <- c(-5500,

Why geom_boxplot identify more outliers than base boxplot?

倾然丶 夕夏残阳落幕 提交于 2019-12-30 10:35:40
问题 Here is a reproducible example, the last treatment group has one more outliers identified compared to the base boxplot. ``` dta <- structure(list(Treatment = c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "C", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "D", "A", "A", "A", "A

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

R ggplot2 boxplots - ggpubr stat_compare_means not working properly

落爺英雄遲暮 提交于 2019-12-28 16:13:28
问题 I am trying to add significance levels to my boxplots in the form of asterisks using ggplot2 and the ggpubr package, but I have many comparisons and I only want to show the significant ones. I try to use the option hide.ns=TRUE in stat_compare_means , but it clearly does not work , it might be a bug in the ggpubr package. Besides, you see that I leave out group "PGMC4" from the pairwise wilcox.test comparisons; how can I leave this group out also for the kruskal.test ? The last question I

Changing the outlier rule in a boxplot

只谈情不闲聊 提交于 2019-12-28 13:24:15
问题 I have constructed some box-plots in R and have several outliers. I know that the default criteria to set outlier limits are: Q3 + 1.5*IQR Q1 - 1.5* IQR However, I would like outliers classified as values that fall outside of the boundaries: Q3 + 3*IQR Q1 - 3* IQR Is it possible to set this in R? 回答1: From ?boxplot range : this determines how far the plot whiskers extend out from the box. If ‘range’ is positive, the whiskers extend to the most extreme data point which is no more than ‘range’

Changing the outlier rule in a boxplot

a 夏天 提交于 2019-12-28 13:23:48
问题 I have constructed some box-plots in R and have several outliers. I know that the default criteria to set outlier limits are: Q3 + 1.5*IQR Q1 - 1.5* IQR However, I would like outliers classified as values that fall outside of the boundaries: Q3 + 3*IQR Q1 - 3* IQR Is it possible to set this in R? 回答1: From ?boxplot range : this determines how far the plot whiskers extend out from the box. If ‘range’ is positive, the whiskers extend to the most extreme data point which is no more than ‘range’

Adding a scatter of points to a boxplot using matplotlib

时光毁灭记忆、已成空白 提交于 2019-12-28 08:39:15
问题 I have seen this wonderful boxplot in this article (Fig.2). As you can see, this is a boxplot on which are superimposed a scatter of black points: x indexes the black points (in a random order), y is the variable of interest. I would like to do something similar using Matplotlib, but I have no idea where to start. So far, the boxplots which I have found online are way less cool and look like this: Documentation of matplotlib: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.boxplot

Unify boxplot factor group colours

断了今生、忘了曾经 提交于 2019-12-25 17:17:27
问题 I'm somewhat of an R and ggplot novice so I'm struggling to plot this data as a box plot with Flux on the y and Week on the X, with the boxplots grouped by species (and within each species group treatment). Treatment Species Week Flux 1 L- Heisteria 1 0.19 2 L- Heisteria 1 0.03 3 L- Heisteria 1 NA 4 L- Heisteria 1 0.12 5 L- Simarouba 1 0.22 6 L- Simarouba 1 0.19 7 L- Simarouba 1 NA 8 L- Simarouba 1 -0.65 9 C Heisteria 1 -0.99 10 C Heisteria 1 0.10 11 C Heisteria 1 0.26 12 C Heisteria 1 NA 13