Coder Social home page Coder Social logo

jfreechart-aida-experimental's People

Contributors

jeremymccormick avatar

Stargazers

 avatar

Watchers

 avatar  avatar

jfreechart-aida-experimental's Issues

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.

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.

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.

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.

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.

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 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.

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.

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.

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

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.

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.