Is it possible to assign different colors to different grid squares on an XYplot in jfreechart?
I have a chart whose grids I want to assign different values and want to assign colors based on these values
Thanks
How this can be done on an XYSeriesCollection for XYSeries?
Yes, among the JFreeChart Samples, XYTaskDatasetDemo2 and XYBlockChartDemo[1-3] are examples.
Related
i am using Quadrant Chart from anychart.
https://playground.anychart.com/docs/v8/samples/BCT_Quadrant_Chart_04
this allows only four divisions like rightTop, rightBottom, leftTop, leftBottom
i need to generate for nine divisions.
is there any way to generate nine divisions instead of four in anycharts?
my data im representing in the form of bubbles
divisions should have labels associated with each and scale is also required on x-axis and y-axis
please help me what should i be doing to get this kind of divisions with label and scale.
thanks a lot for the help
The Quadrant chart doesn't support more than 4 divisions, but you can implement the required chart with 9 divisions (3x3 according to your screenshot) with a Scatter chart, bubble series and some specific settings. I have prepared a sample on AnyCHart Playground, this should help you.
How can I plot (many) uncorrelated points from a data file in 3D with color corresponding to the value of one column? The color-value is non-integral.
======================================================================
details:
I have a large data file with three columns of the form
longitude latitude color
The data is scattered and uncorrelated, i.e. no underlying grid and no relationship between the points (except that every coordinate appears only once). color is an arbitrary scalar. I know the min and the max value of that, and would like to have linear scaling of the color in between. Which colormap is not clear atm, a first step would be to produce any meaningful output.
How can I plot dots on the longitude-latitude coordinates on the unit sphere (i.e. radius = 1) with the specified color?
No interpolation is wanted, not even a connection between the points. (I'm also happy for suggestions how to do that in an easy way, but it's actually not important)
This is how far I've gone, but the coloring is missing:
set mapping spherical
splot 'the_file.data' u 1:2:(1)
Thanks a bunch!
You can use linecolor palette, which allows you to specify an additional column which is used to select the respective color from the current palette:
set mapping spherical
splot 'the_file.data' using 1:2:(1):3 linecolor palette
I'm trying to create a combined scatter plot and "bar chart" - the bars extend the full height of the chart, but their width varies (I have a table with the start and finish points on the x-axis).
Here is a mock-up:
http://imgur.com/EHzv5YB
Do you think this is possible in Excel? I have found some links on how to overlay multiple plot types, but none involving variable width shaded areas as seen in the example.
Would really appreciate any help. Thanks!
I've written a tutorial showing how to Highlight Certain Time Periods in a Chart.
I am trying to generate a time series with the area underneath filled with color.
Looking at examples of the jfreechart library there is this method:
ChartFactory.createAreaChart(...)
However the dataset required is a Category dataset, something quite different from the Time Series Dataset that I currently create:
ChartFactory.createTimeSeriesChart(...)
Which methods should I use to fill with color the area underneath the plotted line?
Thank you!
Add the following after you create the a chart (using createTimeSeriesChart)
XYPlot plot = (XYPlot) chart.getPlot();
plot.setRenderer(new XYAreaRenderer());
I saw some Core-plot sample. Is there anything equivalent that will do my task easily? I also want to know feasibility with Core-plot in iPhone. (any issues with core-plot)
I want to have multi-colored vertical bar chart. Is it possible to customize Core-plot framework. Using only one barplot can we have multiple segment on it.
Thank you.
Naveen Thunga
To make a stacked bar plot, you need to make multiple plots, one for each segment. On all but the bottom plot, set barBasesVary to YES. The datasource will ask for a third field called CPTBarPlotFieldBarBase which is the base value for the bar. You will have to do the stacking calculations yourself.
The horizontal lines can be drawn using an additional bar plot. Give the bars a short height (tip - base). You can make the width wider than the others if you want--each plot is independent.
The space between the bars depends on several factors. By default, bar widths are specified in data coordinates. For example, if the bar locations are one unit apart, a bar width of 0.5 will make the bar width and the space between the bars equal; a bar width of 0.75 will make the space 1/3 of the bar width. The actual width in pixels depends on the size of the graph and how many bars are visible (determined by the plot range along that axis). If barWidthsAreInViewCoordinates is YES, then bar widths are given in pixels which keeps them the same apparent width as the plot range changes, but the space between them will change with the plot range.