I am hoping someone can help me with an issue setting points on a bar graph with multiple start and stop points along each series. Note the first and last bars each have multiple starting and ending points.
Any tutorials or sample code would be greatly appreciated. sorry the image is so small.
What you are looking for are range bar charts
chart.Series[0].ChartType = SeriesChartType.RangeBar;
as always with MSchart, I'd recommend you take a look at the samples provided HERE. It has a section that demonstrate how to use RangeBar charts to achieve what you described.
Related
I have very sparse data and I want to adjust the chart so that I can show the amount of the positive event rather than it being a speck on the chart next to the negative class.
In thinkcell ( an excel and powerpoint add in), there is a cool feature where you can effectively "hide" a part of the frequency. An example is here.
The squiggly lines are a cut off to change the scale.
The kind of data I am working with
a<-data.frame("Changed"=rep(0,900))
b<-data.frame("Changed"=rep(1,50))
example<-data.frame(Changed=rbind(a,b))
hist(example$Changed)
Any suggestions on how to do this or how to represent this? I guess at worst I could change the limit of the chart and just label it to show the value in the base... but its not that pretty or obvious.
Appreciate any thoughts.
J
I'm attempting to try and increase the vertical spacing between multiple x-axes using JFreeChart. Currently, my charts look like this:
Current chart
However, I need to produce something like the following so that the x-axes are more clearly defined (note that the vertical spacing between the x-axes is larger than in the first image):
Desired chart
Does any one have any idea on how to do this? I've been searching the JFreeChart API for > 2 days now and can't find anything that directly addresses the issue other than attempting to use org.jfree.chart.axis.AxisSpace in some way.
Many thanks for any help!
One approach would be to customise the axis label insets (that is, increase the space below each axis label).
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/Axis.html#setLabelInsets-org.jfree.ui.RectangleInsets-
I know it is possible to create such double pie charts in excel like this:
http://chandoo.org/wp/2009/12/02/group-small-slices-in-pie-charts/
but can SPSS or R do this also?
In relation to R:
The answer to the title question is "yes" ... see ?pie
As for the second question, the one in the body - it would be possible but would involve some coding. You'd have to draw two pie charts side by side (which could be managed with two calls to pie) and use segments or arrows (and text if necessary) to do the additional components of the plot.
Here's a rough example:
That required the fig argument of par to get them side-by-side.
(That example required a little fiddling to get right, but it would be possible to write a function to automate the details.)
The main issue I can see would be 'why on earth would you do it?' -- pie charts are a poor way of conveying information of this form. There are alternatives that result in much better ability to distinguish values, and less bias (such as what you get when comparing nearly horizontal vs nearly vertical slices).
I know it is possible to create such double pie charts in excel like this:
http://chandoo.org/wp/2009/12/02/group-small-slices-in-pie-charts/
but can SPSS or R do this also?
In relation to R:
The answer to the title question is "yes" ... see ?pie
As for the second question, the one in the body - it would be possible but would involve some coding. You'd have to draw two pie charts side by side (which could be managed with two calls to pie) and use segments or arrows (and text if necessary) to do the additional components of the plot.
Here's a rough example:
That required the fig argument of par to get them side-by-side.
(That example required a little fiddling to get right, but it would be possible to write a function to automate the details.)
The main issue I can see would be 'why on earth would you do it?' -- pie charts are a poor way of conveying information of this form. There are alternatives that result in much better ability to distinguish values, and less bias (such as what you get when comparing nearly horizontal vs nearly vertical slices).
I have some data that I'm plotting with GNUPlot. I have three different data sets for different energies. What I need to do is label the maximas on the plot. For example, I need something like (20, 4.5) for the red plot. The values do not need to be above the maximas, as they only need to be distinguishable to which is what. Is there any easy way to do this in GNUPlot? I haven't been able to find anything online.
Thanks in advanced. Below is an example plot that I'm trying to work with. It wouldn't let me post images so I'm posting the link below.
http://i.imgur.com/xA3q52I.png
I think this example can help
http://www.gnuplot.info/demo/stats.html