Legend « Plot « JFreeChart Q&A





1. Is it possible to add Legend to the plot in JFreeChart?    stackoverflow.com

I'm trying to add a legend under the plot in scattered chart as shown below. Anyone knows if this is possible? Before: alt text After: alt text

2. How to add legend in plot area?    jfree.org

Hi all, i have three questions. 1) I have to display the legend in the plot area insted of displaying it in chart area. 2) how to display the category axis values in the form of table in chart. 3) how to add the $ symbol to the values in the value axis. if anybody know the answer and if u ...

3. Legend inside Plot    jfree.org

4. Legend inside Plot    jfree.org

5. Help! How to get Legend Inside the Plot under rc1?    jfree.org

Help! How to get Legend Inside the Plot under rc1? by Howie Mon Sep 19, 2005 5:55 am Hiya all, I checked the doco's and the premium doco's/demo's but i can't figure this out. Can someone tell me how I can move the chart legend to inside the top right hand corner of the plot? So from this: To this: ...

6. Box Legend Keys instead of Lines for XYPlot    jfree.org

I wrote an XYPlot that adds and removes dataseries and traces based on dynamic packet data received through a TCP/IP Port. The problem I'm having is fairly simple comparatively, but I haven't been able to find an answer. Legend Keys are added to the legend if new unrecognized data is received, meaning it must be part of a new Series in ...

7. Turning off Subplot Legends in CombinedDomainXYPlot    jfree.org

I have a CombinedDomainXYPlot with 7 subplots. The subplots all have the same legend when they are added. I want to make it so that only one of the subplot legends are shown at the bottom of the ChartPanel. Otherwise, the Legend repeats 6 additional times. Is it possible to only use one of the subplot Legends as the Legend for ...

8. combinedDomainXYPlot with a legend for each subplot ?    jfree.org

Hi All, Is it possible to get a separate legend for each of the subplots in a combinedDomainXYPlot ? If we have 3 or 4 plots and each plot with many time series data, one legend below does not seem appropriate. Is it possinble to have one legend per plot in a combined graph ? Further is it possible to position ...

9. How to have one legend for each subplot of a combined plot?    jfree.org

Following a similar vein, is it currently possible to have the colors of each subplot's series start again from red. The general order of series colors is RGBYMC..., but the first series of the second subplot continues where the first left off in the sequence. For example, if the first subplot has 3 series, they will be red, green, blue, and ...





10. Display a legend for the ThermometerPlot chart    jfree.org

Hello all, I'm really hoping you can help me. I've only mildly tweaked the JFreeChartThermometerDemo2 code to use my dataset instead of the default. I've created charts before using JFreeChart and have had no problem displaying the legend. It doesn't seem to be as easy in this instance. The plot does not have a renderer. Does anyone know how I may ...

11. Scatter Plot + Legend Problem    jfree.org

13. How do I access the Legend in a plot in a combined plot?    jfree.org

With simple charts, I control the position of the Legend using something like the following: if (imax > 2) theChart.getLegend().setPosition(org.jfree.ui.RectangleEdge.BOTTOM); imax, here, is just the number of series in the plot. However, now I need to use a org.jfree.chart.plot.CombinedDomainXYPlot with multiple plots using org.jfree.chart.plot.XYPlot Now, with one of the plots, there needs to be a legend, positioned either at the side ...

14. Would appreciate advice on customizing a legend for XYPlot..    jfree.org

Hello, I have an XYPlot in a ChartPanel that displays a combination of XYSeries and XYPolygonAnnotations. I had developed a "pseudo-legend" inside the XYPlot for displaying a small example of the XYSeries line (or example of the XYPolygonAnnotation) followed by an XYTextAnnotation. I did this by simply calculating appropriate XY coordinates for these items. However, I now have a problem. I ...

15. Legend on each Plot    jfree.org

CombinedPlotLegend by ralphy Wed Jun 11, 2008 5:04 am Heres a class that does it - but very nastily by accessing the private, transient and unstable subplotAreas field in CombinedDomainXYPlot... Any suggestion on removing the reflection hack in getSubplotAreas() would be much appreciated! This field is actually always a 'draw behind' and doenst work on the first draw. It also ...





17. Altering Legend in CombinedDomainCategoryPlot    jfree.org

How do you alter the legend in a CombinedDomainCategoryPlot? I have several barcharts (the number is determined at runtime) that have the same domain items, and the legend wants to show a key for each domain item on each chart. In the end the legend shows 15 keys for 3 charts when 5 keys is all I need. Also, is there ...

19. legend to be displayed inside of the plot    jfree.org

Hi, I am using jfree version 1.0.6. I have a chart, in that the values are displaying with the line/arrow. 1) I dont want to display the values on the chart. Is it possible to remove the lines from the chart. In the previous versions like 0.9.16 the chart is displaying without values on the chart. I want same like previous ...

20. Legend position for CategoryPlot    jfree.org

2 questions regarding positioning of legend boxes: (1) I saw a few posts on including the legend box in the chart area. However this seemed to apply only to XYPlots. Is there anyway to do this for a CategoryPlot? (2) Is it possible to place the legend box outside of the chart area, other than the RectangleEdge - TOP, BOTTOM, LEFT ...

22. Position legend within xyplot    jfree.org

23. Create a legend for DialPlot    jfree.org

Hi all! I've just created a dialPlot with three needles and now i'd like add a legend for specify the meaning of each ones... but I don't find a method about it. In fact i saw that for this plot there is the method getLegendItems() while therisn't a setLegendItems() and if I test the getLegendItems() method it returns ever null... Someone ...

24. Scatterplot with customized legend    jfree.org

You can transform any String into a Shape. See this example: Code: Select all import java.awt.*; import java.awt.event.*; import java.awt.font.*; import java.awt.geom.*; import javax.swing.*; import javax.swing.event.*; public class FontShapeDemo extends JComponent { public FontShapeDemo(String text) { setPreferredSize(new Dimension(200, 200)); } public void ...

25. Combined plots: how do I get a legend for each plot?    jfree.org

I figured out how prevent duplicate legend items from appearing in the "consolidated" legend of a combined plot. If I have 2 plots with same x-axis data series, they will appear in a combined plot with ONE COMMON color for each line connecting the series. The legend will contain ONE consolidated item (the legend item applies to both plots). In this ...

27. Legend inside plot    jfree.org

Hello, I've got the same question, since e.g. Gnuplot is able to place the legend inside the chart. There was also another question concerning separate legends in a CombinedDomainXYPlot possibly related to the same problem. If I plot several charts in one CombinedDomainXYPlot I want to have separate legends for each chart, but the same X-Axis. This seems not to work. ...