stacked-area-chart

Highcharts: having trouble recreating stacked area chart from Excel with positive and negative values

拟墨画扇 提交于 2019-11-30 18:08:30
问题 I'm converting a series of Excel charts into Highcharts, and came across a curious situation involving a stacked area chart with both positive and negative values. Here is now the chart is displayed in Excel, along with the accompanying data points. For illustration purposes, I've selected series G. Despite having all positive values in its data, it appears at the bottom of the stack, beneath the zero line. Here is how the chart appears in Highcharts (see below). In this instance, series G

Create a 100 % stacked area chart with matplotlib

让人想犯罪 __ 提交于 2019-11-29 06:50:39
I was wondering how to create a 100 % stacked area chart in matplotlib. At the matplotlib page I couldn't find an example for it. Somebody here can show me how to achieve that? A simple way to achieve this is to make sure that for every x-value, the y-values sum to 100. I assume that you have the y-values organized in an array as in the example below, i.e. y = np.array([[17, 19, 5, 16, 22, 20, 9, 31, 39, 8], [46, 18, 37, 27, 29, 6, 5, 23, 22, 5], [15, 46, 33, 36, 11, 13, 39, 17, 49, 17]]) To make sure the column totals are 100, you have to divide the y array by its column sums, and then

Getting a stacked area plot in R

那年仲夏 提交于 2019-11-26 09:37:26
问题 This question is a continuation of the previous question I asked. Now I have a case where there is also a category column with Prop. So, the dataset becomes like Hour Category Prop2 00 A 25 00 B 59 00 A 55 00 C 5 00 B 50 ... 01 C 56 01 B 45 01 A 56 01 B 35 ... 23 D 58 23 A 52 23 B 50 23 B 35 23 B 15 In this case I need to make a stacked area plot in R with the percentages of these different categories for each day. So, the result will be like. A B C D 00 20% 30% 35% 15% 01 25% 10% 40% 25% 02