bar-chart

Ordering of faceted stacked barplot with ggplot2

删除回忆录丶 提交于 2021-01-27 12:33:32
问题 I have a dataset like the below and am trying to get an ordered faceted stacked barplot. I have looked at some answers on SO particularly this one to come up with my plot but am not sure why this does not work on one particular bar of my stacked barplot structure(list(reg = c("J", "J", "J", "J", "J", "J", "J", "J", "KA", "KA", "KA", "KA", "KA", "KA", "KA", "KA", "KA", "KA", "RI", "RI", "RI", "RI", "SU", "SU", "SU", "SU", "SU", "SU", "SA", "SA", "SA", "SA", "SA", "SA", "SA", "SA", "SA", "SA",

Bokeh - Stacked and grouped charts

跟風遠走 提交于 2021-01-27 06:56:29
问题 Is it possible to create a plot in bokeh that is both stacked and grouped? Kinda like http://www.highcharts.com/demo/column-stacked-and-grouped/. The dataset is something like this count date class user 39 2016/12/28 4 user1 26 2016/12/28 4 user2 3 2016/12/28 4 user2 8 2016/12/28 4 user1 1 2016/12/28 4 user1 22 2016/12/28 4 user1 26 2016/12/28 4 user2 1 2016/12/28 4 user1 7 2016/12/28 4 user2 12 2016/12/28 4 user3 23 2016/12/28 4 user3 31 2016/12/28 4 user3 2 2016/12/31 4 user1 1 2016/12/31 4

Bokeh - Stacked and grouped charts

放肆的年华 提交于 2021-01-27 06:55:31
问题 Is it possible to create a plot in bokeh that is both stacked and grouped? Kinda like http://www.highcharts.com/demo/column-stacked-and-grouped/. The dataset is something like this count date class user 39 2016/12/28 4 user1 26 2016/12/28 4 user2 3 2016/12/28 4 user2 8 2016/12/28 4 user1 1 2016/12/28 4 user1 22 2016/12/28 4 user1 26 2016/12/28 4 user2 1 2016/12/28 4 user1 7 2016/12/28 4 user2 12 2016/12/28 4 user3 23 2016/12/28 4 user3 31 2016/12/28 4 user3 2 2016/12/31 4 user1 1 2016/12/31 4

Plotly-R: How to make a gapped y axis?

*爱你&永不变心* 提交于 2021-01-24 13:47:06
问题 Is it possible to create a plotly bar chart, e.g. any chart from the following website: https://plotly.com/r/bar-charts/ but with the gapped (broken) Y axis? An example from (ggplot2, I believe) attached below: 回答1: To my knowledge, plotly hasn't got any built-in functionality to do this. But it's still possible to make a figure that matches your image using subplots if you: use subplot(fig1, fig2, nrows = 2, shareX=TRUE, margin = <low>) , and adjust the y axes for figure positions [1, 1] and

Grouped bars in descending order?

耗尽温柔 提交于 2021-01-05 07:43:18
问题 I want to organize my graph into two groups and in descending order within each group. I have a file that has variables: structure(list(Description = c("car", "ball", "cup", "pen", "pencil", "computer", "chair", "table", "pillow", "bed", "mattress", "scissors", "book", "spoon", "carpet", "speaker", "frame", "curtains", "shades", "envelope", "cellphone", "letter", "incense", "backpack", "box", "shoes", "vacuum", "screen", "oboe", "mask", "sanitizer", "lights", "bottle", "vodka", "branch",

Grouped bars in descending order?

孤者浪人 提交于 2021-01-05 07:42:05
问题 I want to organize my graph into two groups and in descending order within each group. I have a file that has variables: structure(list(Description = c("car", "ball", "cup", "pen", "pencil", "computer", "chair", "table", "pillow", "bed", "mattress", "scissors", "book", "spoon", "carpet", "speaker", "frame", "curtains", "shades", "envelope", "cellphone", "letter", "incense", "backpack", "box", "shoes", "vacuum", "screen", "oboe", "mask", "sanitizer", "lights", "bottle", "vodka", "branch",

Individually color ticks of a plotly.graph_objects.Bar

梦想的初衷 提交于 2021-01-04 06:38:29
问题 I have a multi-index dataframe dfc which I want to plot as a bar chart with the color of the tick on the yaxis depending on the value of dfc.iloc[i].values[1] for any value i. Unnamed: 1 claimed_benefit perceived_benefit My Burberry - Eau de Parfum je me sens bien 0 0.000000 Her Intense - Eau de Parfum convient bien moi 0 0.000000 Her Intense - Eau de Parfum sensuelle / sexy 0 0.000000 Her Intense - Eau de Parfum nettoyer 0 0.000000 Her Intense - Eau de Parfum haute qualite 0 0.000000 ... ...

Individually color ticks of a plotly.graph_objects.Bar

谁说我不能喝 提交于 2021-01-04 06:37:46
问题 I have a multi-index dataframe dfc which I want to plot as a bar chart with the color of the tick on the yaxis depending on the value of dfc.iloc[i].values[1] for any value i. Unnamed: 1 claimed_benefit perceived_benefit My Burberry - Eau de Parfum je me sens bien 0 0.000000 Her Intense - Eau de Parfum convient bien moi 0 0.000000 Her Intense - Eau de Parfum sensuelle / sexy 0 0.000000 Her Intense - Eau de Parfum nettoyer 0 0.000000 Her Intense - Eau de Parfum haute qualite 0 0.000000 ... ...

Matplotlib, horizontal bar chart (barh) is upside-down

孤人 提交于 2020-12-29 08:55:54
问题 TL'DR , the vertical bar charts are shown in a conventional way -- things line up from left to right. However, when it is converted to horizontal bar chart (from bar to barh ), everything is upside-down. I.e., for a grouped bar chart, not only the order of the grouped bar is wrong, the order of the each group is wrong as well. For e.g., the graph from http://dwheelerau.com/2014/05/28/pandas-data-analysis-new-zealanders-and-their-sheep/ If you look closely, you will find that the the bar and

Matplotlib, horizontal bar chart (barh) is upside-down

前提是你 提交于 2020-12-29 08:55:00
问题 TL'DR , the vertical bar charts are shown in a conventional way -- things line up from left to right. However, when it is converted to horizontal bar chart (from bar to barh ), everything is upside-down. I.e., for a grouped bar chart, not only the order of the grouped bar is wrong, the order of the each group is wrong as well. For e.g., the graph from http://dwheelerau.com/2014/05/28/pandas-data-analysis-new-zealanders-and-their-sheep/ If you look closely, you will find that the the bar and