bar-chart

How to compute confidence intervals and plot them on a bar plot

断了今生、忘了曾经 提交于 2019-12-23 20:04:56
问题 How can I plot a bar out of a data = 1x10 cell , where each value in the cell has a different dimension like 3x100, 3x40, 66x2 etc. My goal is to get a bar plot, where I would have 10 group of bars and in every group three bars for each of the values. On the bar, I want it to be shown the median of the values, and I want to calculate the confidence interval and show it additionally. On this example there are not group of bars, but my point is to show you how I want the confidence intervals

Need help lining up x axis ticks with bars in D3.js bar chart

半世苍凉 提交于 2019-12-23 19:51:30
问题 I have a working linear bar chart using D3.js, which also has time-based x axis. The bars are bound to a count attribute, while the axis is bound to a date attribute. The ticks in the axis are not lining up with the bars. Any idea how to line them both up? Here's the jsFiddle: http://jsfiddle.net/MmEjF/ 回答1: This is happening because the chart has 14 bars, but 15 tick marks. The first tick mark should be the month prior to the start of your data set. You can fix this by pulling forward the

AChart Engine Bar Chart - hide the series when scrolling to right

一曲冷凌霜 提交于 2019-12-23 18:04:28
问题 I am using an excellent library AChart engine for generating bar chart. All features are working fine, but I have couple of things which I am not able to resolve: this is my screen shot: Now there are two things that needs to be fixed: 1) Hide the series when it is scrolled to right, currently the series March is visible even after 0,0 also. 2) Gridlines are on top of the graph but it should be behind the graph. 3) How to display the legends on top right corner instead of bottom. here is my

How do I create a stacked column chart purely through programming with excel vba?

房东的猫 提交于 2019-12-23 17:45:04
问题 I am trying to create a stacked column chart in VBA where there is a bar graph and each bar graph shows the breakdown of subcategories on the graph (See right side of picture). For the normal bar graph all I had to do was create a new series and set the Values and XValues properties. I'm not sure how to tell it about the values for the subcategories. (source: msecnd.net) 回答1: The simplest way to start a task like this is to see what happens when you perform the task by hand, using the Macro

Creating barplot with standard errors plotted in R

孤街浪徒 提交于 2019-12-23 16:17:04
问题 I am trying to find the best way to create barplots in R with standard errors displayed. I have seen other articles but I cannot figure out the code to use with my own data (having not used ggplot before and this seeming to be the most used way and barplot not cooperating with dataframes). I need to use this in two cases for which I have created two example dataframes: Plot df1 so that the x-axis has sites a-c, with the y-axis displaying the mean value for V1 and the standard errors

Gnuplot: how to fill a bar with both a color background and a pattern

本小妞迷上赌 提交于 2019-12-23 11:52:11
问题 I want to fill a bar with both a color background and a pattern. Is it possible in Gnuplot? I am using Gnuplot 4.6.5 The code I have now: # set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 # set output 'histograms.2.png' set boxwidth 0.9 absolute set style fill solid 1.00 border lt -1 set key inside right top vertical Right noreverse noenhanced autotitles nobox set style histogram clustered gap 1 title offset character 0, 0, 0 set datafile missing '-' set

Flot bar chart: bars overlapping on time axis issue

痞子三分冷 提交于 2019-12-23 10:13:16
问题 I am trying to plot expense data against time axis, and I see the data bars are overlapping if they are showing data for the same date. I was expecting the graph to show the bars asjascent to each other but that is not the case. See a sample of code at this link... $.plot($("#placeholder"), newJson, { bars: { show: 1, barWidth: 24 * 60 * 60 * 1000 * 10 }, xaxis: { mode:"time" } }); 回答1: Unfortunately, that isn't possible in flot without using some sort of plugin. I suggest you either use the

Reorder stacked barplot x based on fill values with ggplot2

浪尽此生 提交于 2019-12-23 09:59:40
问题 A survey with 5 questions is administered. The questions share the same set of possible answers. Here are the data, reshaped for plotting with ggplot2. library(tidyr) library(magrittr) data <- data.frame(ID = c(1:500), q1 = factor(sample(c(1:4), 500, replace = T), labels = c("A", "B", "C", "D")), q2 = factor(sample(c(1:4), 500, replace = T), labels = c("A", "B", "C", "D")), q3 = factor(sample(c(1:4), 500, replace = T), labels = c("A", "B", "C", "D")), q4 = factor(sample(c(1:4), 500, replace =

Convert a d3 chart to load data from json inside a variable

懵懂的女人 提交于 2019-12-23 09:57:52
问题 I'm trying to make a bar chart with d3, and for this I'm following this tutorial d3noob chart, everything looks good but I'm unable to load the data from a JSON inside a variable instead of load from a JSON file, i've managed to load the json to a var but I have no idea of how to iterate the data and create the bars. The code: <!DOCTYPE html> <meta charset="utf-8"> <head> <style> .axis { font: 10px sans-serif; } .axis path, .axis line { fill: none; stroke: #000; shape-rendering: crispEdges; }

Bar plot with timedelta as bar width

让人想犯罪 __ 提交于 2019-12-23 09:43:18
问题 I have a pandas dataframe with a column containing timestamps ( start ) and another column containing timedeltas ( duration ) to indicate duration. I'm trying to plot a bar chart showing these durations with their left edge at the timestamps. I haven't found anyway online of doing it. Is there any way to achieve this? So far, this is what I have, which doesn't work: height = np.ones(df.shape[0]) width = [x for x in df['duration']] plt.bar(left=df['start'], height=height, width=width) Edit: I