jfreechart-aida-experimental's People
jfreechart-aida-experimental's Issues
Implement display of 2D histograms using ellipses
This is the "ellipse" style from JAS / AIDA. The renderer can be partially based on the XYBoxRenderer used for the box plots.
Add legend showing the datasets in a plot
There should be a legend that shows a color-coded key of the datasets in a plot, especially when multiple plots are overlayed in the same chart. Presumably there are settings in AIDA which determine when this should be visible, and these should be respected.
Implement PlotterRegion.clear() method and make sure plots can be readded
The IPlotterRegion.clear() method is not implemented in PlotterRegion. Once the state of the region is torn down in that method, it should be possible to then add another plot which is then plotted properly. This should have a proper test case.
Fix overlaying of Histogram2D box plots
Overlaying two or more Histogram2D box plots in the same region results in rather interesting behavior.
Rework the concept of embedded Plotter
Plotters can be embedded where they are put into an external JFrame. The configuration of embedding needs to be looked at and reworked so that it is minimally complicated and more intuitive.
Implement the methods in IPlotterRegion to get and set the axis limits
See this link:
http://aida.freehep.org/doc/v3.3.0/api/hep/aida/IPlotterRegion.html
setXLimits()
xLimitMax()
etc.
Implement support for variable bin widths in 2D histograms
This needs to be done for both the box plot and color map rendering. It should not be too difficult to determine the size of the bin to draw from the X and Y values of the current data item from within the renderer.
Do not display 0 values for Histogram1D bins when using the XYStepRenderer
When using the step renderer, values of zero should be skipped when displaying Histogram1D data. This is trickier than it sounds because the XYStepRenderer acts strangely if they are simply left out of the datasets. Nothing at all should be displayed for these values. Right now, when using the XYStepRenderer, there is a solid line at zero and a small error bar, neither of which should be displayed at all. This will probably require a custom renderer, as skipping zero values would cause subsequent points to be connected to the previous one, which is not the desired behavior.
Create separate class for managing the objects associated with a PlotterRegion
The PlotterRegion class has a lot of object state associated with it such as the association between objects and their styles, as well as the listeners for updating the plots on the fly.
This code should be refactored into a PlotterRegionBackend class so that it is better organized.
Using the listeners should be optional so that regions can be updated manually if desired
By default, listeners are added so that plots are updated on the fly when the backing AIDA object is modified. This should be optional so that if desired, the regions can be updated manually for a finer level of control from the user application.
Cleanup, organize and refactor PlotterRegion and related classes
The PlotterRegion class should be reorganized to avoid duplication and unnecessary method calls. There is some duplication between the code that creates new charts and that which performs an overlay.
Methods that create new JFreeChart objects should instead create new XYPlots.
Handle on the fly conversion of 1D cloud to histogram
When a Cloud1D is converted into a histogram, the underlying chart needs to be updated with the new plot.
Given the current architecture of PlotterRegion etc. this is difficult to do.
I will work on this issue on a branch.
Converter interface should not create new JFreeChart objects
The converter interface currently creates JFreeChart objects, but this is probably unnecessary. It would be better if it created XYPlot objects that could be added or overlayed onto an existing JFreeChart. By default, the PlotterRegion should have a single JFreeChart created by default which is not replaced.
Cleanup tests
They are a mess right now. The default 'mvn install' should run all non-interactive tests and produce graphics for them in the target/ dir.
Check current implementation and handling of Profile1D objects
The IProfile1D is adapted to the IHistogram1D interface for display. Currently it doesn't have a valid PlotListener but this should be setup in the PlotterRegion.
Fully implement styles in JFreeChart.
The IPlotterStyles should be implemented as much as possible using the JFreeChart backend. This is a huge undertaking to support everything in IPlotterStyle, as this is a very complex, hierarchical class. But the most-used options should definitely be well supported.
Range of x axis for displaying DataPointSet needs to show a reasonable number of points
By default, it crams in all the points to the x axis range, which gets to look pretty ridiculous after 100+ data points are added. There should be a setting which will make only a certain number of points displayed, after which they are discarded.
Add test case that shows all unique AIDA object types using one Plotter
Should have a test case that plots all AIDA object types using one Plotter.
Implement basic ROOT style
There should be an IPlotterStyle implementation that looks like ROOT's defaults, e.g. graying background with fairly thick lines, black unfilled histograms displayed as step chart, etc. I will need to take a look at ROOT's defaults in detail to implement this. This is primarily useful for 1D histograms without overlay.
Separate rendering of points from lines in function style
Since the function adapter currently uses a single renderer, it is not possible to have points with a different color than the line. Two renderers and datasets should be used here so that these can have different colors and style attributes assigned to them.
TODO for HistogramConverterFactory
Still need converters for:
IProfile2D
IDataPointSet (w/ dimension <= 2)
IFunction
These should be handled with a separate package like JZY3D:
ICloud3D
IHistogram3D
IDatapointSet (w/ dim of 3 or 4)
IHistogram2D (as 3D lego plot)
Implement some kind of default display of Cloud 1D before conversion
It would be nice if a Cloud1D could be display without converting it into a histogram. This could be done by plotting points along the X axis at Y = 0 for each value in order to make a kind of 1D scatter plot of the data.
Implement 3D histograms and clouds
This will probably require using another toolkit entirely such as JZY3D. The 3D display would needs to be well integrated into the current Plotter and PlotterRegion classes, which would need to be heavily modified and made more abstract to support this. In particular, the 3D plots would probably need their own implementation of PlotterRegion.
By default remove margins when displaying 2D histograms
Currently there is a margin when color maps are display (and box plots?) but this should by default be removed so that only the data area is showing.
Error bars in 1D histograms should not be displayed when underlying bin value is 0.
The error values for 1D histograms should not be displayed if the value of the corresponding bin is 0. I think it is causing small lines to be drawn just above the X axis, which looks strange. It may work to simply leave the error values out of the errors dataset when it is being generated from the histogram data.
Refactor the StyleConverters to use the ChartState object
The method signatures should be changed so that the chart, AIDA object, and style do not need to be passed as arguments but are read from the ChartState set on the converter.
Update plot when function is changed
Functions can be plotted but are currently static and not updated. When a plot is changed, if there is a function assigned to fit it, then the function should be refit. Max Turri indicates that it is possible to find the data associated to a function through the method dataDescription() which is of the form "[ClassName] [ObjectName]" and from this the function and data (e.g. histogram etc.) can be connected to each other.
Remove incorrect graphics along X axis for Histograms.
It seems like the tic marks as well as maybe the error bars are possibly creating graphical garbage along the bottom of the X axis just inside the data area. This will show up when, for instance, creating Histogram1D plots. Correcting this may require creating custom renderers that do not try to draw datasets values when they are zero. These values should simply be skipped in most cases.
Handle conversion of Cloud1D objects to histograms
This needs to be handled properly by creating a new Histogram1DAdapter for the Cloud after the conversion happens. I don't think this is done right now.
Implement HistogramAxis to display tic marks corresponding to bin edges
There is an example in this library:
Implement default IPlotterStyle objects for different AIDA types
There should be default IPlotterStyle objects with reasonable defaults for each type such as Histogram1D, Cloud2D, etc.
These should be accessible via the PlotterFactory or a style store or factory.
The freehep-jaida package hep.aida.ref.plotter.style.registry has a style store, but it looks quite complicated to setup and use.
Implement plotting of IProfile2D objects
The PlotListener should probably have a reference to the chart's datasets.
The PlotListener should have a reference to the applicable dataset such as the adapter which has the reference to the histogram. It may need to know which dataset of the chart was updated.
Cleanup and correct code to build chart legend
The LegendUtil code should be cleaned up to do the right thing for the different types of plots.
In certain cases it seems to be leaving out the legend when it should be drawn (see ExamplePlotDriver).
Put overlay logic into Converters
The Converter.convert method will take a JFreeChart (due to changes from iss48 branch) which if non-null means the plot should be added to the existing chart rather than a new chart created.
Miscellaneous TODOs for StyleConverter
Foreground Color
What is this supposed to paint? Which components? Overrides other styles? See freehep-jaida for details.
Data Area Border Type
Borders are difficult to draw generically in JFreeChart because plots are not built with internal Swing JComponents.
2D histograms (see JAIDA code)
different color map types
Object converters should not create new JFreeChart.
The object converters should create XYPlot objects instead of a new JFreeChart that is merged with the existing base chart. There should be only one JFreeChart created for each region.
Implement sensible automatic defaults for axis tic marks and labels.
The tic marks and axis labels need to be generated automatically in a sensible way so that they are not too cluttered and do not overlap. Perhaps the default behavior in terms of how many labels to show could be a settable parameter. Basically, the axis range should be examined to see where the tics should be placed, and these should be sensible in terms of base 10, e.g. do not show labels at 7, 14, etc. but 10, 20, etc.
Rounding could be done using a simple calculation such as this:
http://answers.yahoo.com/question/index?qid=20080316124302AAWhWQB
The font for tic labels also needs to be sensible based on the size of the plot.
Fix adding of IFunction to a chart
This is broken by recent changes and needs to be fixed.
The implementation of automatic refitting is a separate issue.
Implement IDataPointSet plotting
See example code here:
http://aida.freehep.org/doc/v3.3.0/UsersGuide/dataPointSets.jsp#DataPointSetCreateAndFill
I think it only makes sense for now to plot these when they have 1 or 2 dimensions.
Determine when the step chart style should be activated
In AIDA, there is actually no explicit style setting that activates a step chart style plot. In AIDA, this is done automatically when it is determined that the histogram bar widths are too small to display their line outlines. (The style of the bar chart lines is determined by dataStyle().lineStyle() in AIDA.)
The step chart could be turned on by default if none of the other display options were set on the dataStyle. So if the lineStyle, fillStyle and outlineStyle were all set to invisible, then the step chart rendering could be activated by default. Though this is problematic behavior to have as the default for several reasons.
Should the style settings on the step chart lines come from dataStyle().lineStyle() even though it would be technically set to invisible?
For now, step chart rendering is disabled completed in Histogram1DStyleConverter around line 114.
// FIXME: Determine if this should actually happen here!
// Turn on the step renderer by default.
// XYItemRenderer stepRenderer = plot.getRenderer(STEPS);
// stepRenderer.setSeriesVisible(STEPS, true);
// stepRenderer.setSeriesPaint(STEPS, color);
// stepRenderer.setSeriesStroke(STEPS, stroke);
Determining whether the bar widths are too narrow to display their outlines is a non-trivial matter, as it could depend on the state of the chart's panel at any given time (e.g. if it is resized).
Fix y axis margins for IHistogram1D plots
Some of the y bounds are not great enough when running the InteractiveHistogram1DStyleTest. The maximum Y value might need to be retrieved from the error values by adding a method like getMaxY() to the adapter class.
Add color rotation support
Add color rotation of plot fill colors. Allow this rotation to be easily settable and enabled by the user.
Add AIDA parameters for tick settings
JFreeChart has the following tic settings:
-minor inside length
-minor outside length
-major inside length
-major outside length
As far as I know, AIDA does not have style bindings for any of these, so they should be added as available parameters and used when applying styles to charts.
Rename package plot.style to plotter.style
The statistics box should be placed in a reasonable position by default.
Right now its position must be set manually.
User string options to PlotterRegion.plot methods are ignored.
The options string is ignored. I need to check freehep-jaida to see what these are supported to do. I think they are pretty free form depending on what is being plotted.
Handle on the fly conversion of Cloud2D to Histogram2D
I do not think this works right now. (Need to test.)
Implement code for redrawing IPlotterRegions when regions are added or deleted from the Plotter
The plotter needs to redraw its regions correctly when ones are added are deleted and it is showing.
Show number of overflow bins in statistics box
I need to double check if number of overflow and underflow bins shows in the statistics box.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.