stacked-chart

create a bar chart using plotly

杀马特。学长 韩版系。学妹 提交于 2019-12-24 10:30:27
问题 I'm trying to create a bar chart using plotly . The input data looks like: In [7]: datag.ix[:,0].tolist()[1:6] Out[7]: [2020.0, 5000.0, 6010.0, 6017.0, 6020.0] and In [8]:datag.ix[:,1].tolist()[1:6] Out[8]: [0.005178087393490427, 0.0014053668695097226, 0.3174139251746979, 0.006049724003653125, 0.24824287385322272] and the code is import plotly import plotly.offline as offline import plotly.plotly as py import plotly.graph_objs as go trace1 = go.Bar( x=[str(x) for x in datag.ix[:,0].tolist()[1

ASP.NET Stackedbar chart markers

谁说我不能喝 提交于 2019-12-24 09:26:04
问题 I am trying to add markers on my stacked bar chart programmatically and they do not seem to show up. In reality, I need to show a marker on the average of the datapoint but right now, I cannot even show a simple marker on the chart. What am I doing wrong ? Code: Dim chart As New Chart chart.ID = DtDistinct.Rows(I)("CourseSisID") Dim chartareas As New ChartArea chart.ChartAreas.Add(chartareas) chart.Series.Clear() chart.DataBindCrossTable(DtRecords.DefaultView, "Outcomescore", "ShortName",

Horizontal Stacked Bar Chart with Two Y Axis Issues

删除回忆录丶 提交于 2019-12-24 09:15:04
问题 I have the following issues/questions regarding my charts: How can I prevent the right y axis tick values from either being partially deleted or getting inside the chart? When I use the yValuesTripId as domain for both left and right y axis domain the chart draw fine. How can I get it to draw fine with yAxisFirstStopTimes as left y axis domain values and yAxisLastStopTimes as right y axis values? You can view or edit the chart by clicking here: Here is the code: // source : https://gist

Label Areas in Python Matplotlib stackplot

China☆狼群 提交于 2019-12-23 10:24:30
问题 I would like to generate labels inside the areas of a matplotlib stackplot. I would settle for labeling a line used to bound the area. Consider the example: import numpy as np from matplotlib import pyplot as plt fnx = lambda : np.random.randint(5, 50, 10) x = np.arange(10) y1, y2, y3 = fnx(), fnx(), fnx() areaLabels=['area1','area2','area3'] fig, ax = plt.subplots() ax.stackplot(x, y1, y2, y3) plt.show() This produces: But I would like to produce something like this: The matplotlib contour

Text On each bar of a stacked bar chart d3.js

我们两清 提交于 2019-12-18 17:01:32
问题 I would like to have some text in each bar of a stacked bar in stacked bar chart provided in d3.js library. Thanks for your help. I have customized the example here link but I have not changed anything else in the javascript code and here is the result 回答1: Here is the important piece of code: state.selectAll("rect") .data(function(d) { return d.ages; }) .enter().append("rect") .attr("width", x.rangeBand()) .attr("y", function(d) { return y(d.y1); }) .attr("height", function(d) { return y(d

Out of order text labels on stack bar plot (ggplot)

笑着哭i 提交于 2019-12-17 21:28:45
问题 I'm trying to make a stacked bar chart with text labels, this some example data / code: library(reshape2) ConstitutiveHet <- c(7,13) Enhancer <- c(12,6) FacultativeHet <- c(25,39) LowConfidence <- c(3,4) Promoter <- c(5,4) Quiescent <- c(69,59) RegPermissive <- c(23,18) Transcribed <- c(12,11) Bivalent <- c(6,22) group <- c("all","GWS") meanComb <- data.frame(ConstitutiveHet,Enhancer,LowConfidence,Promoter,Quiescent,RegPermissive,Transcribed,Bivalent,group) meanCombM <- melt(meanComb,id.vars

Stacked Column Chart in C#

ぐ巨炮叔叔 提交于 2019-12-17 21:08:06
问题 I am trying to set up my program so that the user can display a stacked column chart that displays the number of reject categories that appear in each department (for example, 5 appear in department 1, 3 in department 2, etc). I've had a look around online and taken a crack at it myself but I cannot seem to get it working. If anyone would be able to help that would be fantastic. What the chart currently does when the user presses a button to switch to a stacked column chart: Code: private

Creating Stacked Bar Chart With one Variable for each Bar, using melt, and ggplot

大憨熊 提交于 2019-12-13 08:57:30
问题 This question is raising different points as the one I posted yesterday, with a better description, so I hope for your understanding. I have the following Data: Data <- data.frame(LMX = c(1.92, 2.33, 3.52, 5.34, 6.07, 4.23, 3.45, 5.64), Thriving = c(4.33, 6.54, 6.13, 4.85, 4.26, 6.32, 5.63, 4.55), Wellbeing = c(1.92, 2.33, 3.52, 2.34, 4.07, 3.23, 3.45, 4.64)) rownames(Data) <- 1:8 Now, my aim is to generate a flipped over bar chart that is showing one bar for each variable with all bars

Is it possible to display percentage and count together?

百般思念 提交于 2019-12-12 04:13:49
问题 I have created a 100.00% stacked bar chart in Tableau, and I want to know if I can show the total count of entries within each category next to the percentage that is listed. This is what I currently have: And this is what I want: _____________________________________________ |______66.66% (666)______|___33.33% (333)___| Is this possbile? 回答1: Yes, drag your measure to the text shelf and set it a percent of total like you have done in columns. Place the same measure again in the text shelf.

How to make a stacked bar plot using ggplot to represent soil column/types

China☆狼群 提交于 2019-12-12 01:36:13
问题 I have my data like this: SampleID From To SampleDepth UnitCode Gravel_perc Sand_perc Fines_perc 2007-01 0.00 0.2 0.100 Soil 25 70 4 2007-02 0.20 0.4 0.300 Clay 45 45 5 2007-03 0.40 0.6 0.500 Silt 40 50 5 2007-04 1.12 1.2 1.160 Soil 45 10 40 2007-05 2.31 2.5 2.405 Clay 10 30 50 I want to make a stacked barplot for the UnitCode with respect to the SampleDepth using different colours. Example - (0 to 0.2 m -> Soil -> Blue), (0.2 to 0.4 -> Clay -> green), (0.4 to 0.6 -> Silt -> pink) etc. Can