#24 Align plotting regions of several charts

open
General (246)
5
2001-09-17
2001-04-24
No

Copied from the JFreeChart discussion forum:

I would like to be able to align the left and right
hand sides of 3 separate plots that are presented
in a vertical column. This is to allow direct visual
comparison at the same x value across all graphs. The
problem I have is that with different y axis lables
and ranges on the left, the width of the vertical axis
varies, (similarly) as does the width of the legends
on the right.

They all have exactly the same min/max x axis values,
but I must put them on different plots because you
can't mix plot types on 1 plot (and their ranges
are very different anyway).

Is there a simple way to force them all to be
vertically aligned on the left and right ? I was
thinking sbout putting the plot regions all in the
same panel, or precalculating the largest common plot
region width, vertical axis, and legend BEFORE drawing
anything, but that didn't look like a simple change.

Thanks for a nice piece of software.
Andrew

Discussion

  • jim northrup

    jim northrup - 2001-09-12

    Logged In: YES
    user_id=135344

    assign this one to me, this is on my plate pretty durn soon.

    Need to have some stylistic guidance at the ready so I don't cut too much or along the wrong seamline when i get to slingin the code around.

    perhaps an email can initiate a phone call

     
  • David Gilbert

    David Gilbert - 2001-09-17
    • assigned_to: nobody --> grrrrr
     
  • Bill Kelemen

    Bill Kelemen - 2001-12-01

    Logged In: YES
    user_id=313278

    I'm working on a CombinedPlot class that will allow one or
    more JFreeCharts to be stacked one on top of another,
    sharing the same HorizontalXXXXXAxis (Date or Numeric)
    object. All vertical axis are aligned and the horizontal
    axis is scaled to include all the data from all the charts.

    As a side effect of the CombinedPlot class, there is a
    CombinedDataset class that joins one or more Datasets into
    one master Dataset, as well as a SubSeriesDataset to
    extract one or more series from a larger Dataset. The
    CombinedDataset is then used for the CombinedPlot while the
    SubSeriesDatasets for individual sub-charts.

    Currently the code is able to display XYPlots and
    HighLowPlots using a slightly modified JFreeChart 0.6.0
    library. I've contacted David Gilbert to find the best way
    to include or distribute these enhancements to JFreeChart.

    Other things I would need are:

    1. Combinable vertical bar charts (i.e. combine a
    HighLowChart of stock prices with the special
    VerticalBarChart below that displays the volume).
    2. I would like to find a solution to display overlaid
    charts (i.e. a HighLowChart with a Moving Average of the
    closing prices).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks