Search found 18 matches

by jt_swanson
Tue Feb 20, 2018 11:14 pm
Forum: JFreeChart
Topic: Customizing Popup menu for PolarChartPanel
Replies: 2
Views: 5325

Re: Customizing Popup menu for PolarChartPanel

So far, I am thinking I need to make an all new menu. This is close to the default menu, except that I am not seeing methods to save to SVG or PDF format, only PNG. So if someone knows what they are, I'd appreciate the help. JPopupMenu menu = new JPopupMenu(); JMenuItem menuitem = new JMenuItem( "Pr...
by jt_swanson
Tue Feb 20, 2018 10:21 pm
Forum: JFreeChart
Topic: Customizing Popup menu for PolarChartPanel
Replies: 2
Views: 5325

Customizing Popup menu for PolarChartPanel

I created a panel with a polar chart, and was requested to remove zoom in, zoom out and autorange from the popup menu. With any other ChartPanel, I could accomplish with arguments to the constructor. However, the constructor for PolarChartPanel does not support this. The createPopupMenu method suppo...
by jt_swanson
Mon Sep 11, 2017 5:16 pm
Forum: JFreeChart
Topic: How to create a category chart with lines to x axis?
Replies: 3
Views: 5780

Re: How to create a category chart with lines to x axis?

I decided not to use XYPlot as the basis for this, as I need a CategoryPlot. I ended up extending drawItem from a copy of MinMaxCategoryRenderer where I changed the variables to protected. I think I can possibly make it simpler than that, since none of the private variables appear to be used anywher...
by jt_swanson
Mon Sep 11, 2017 5:08 pm
Forum: JFreeChart
Topic: change icons in the MinMaxCategory Renderer?
Replies: 3
Views: 5536

Re: change icons in the MinMaxCategory Renderer?

Thanks, For right now I did the simplest, but not the best approach. I simply copied the MinMaxCategoryRenderer and changed the variables to protected. This allowed me to get the plot I was looking for by extending that renderer and adding eight lines of code to drawItem (pretty much what I showed e...
by jt_swanson
Sun Sep 10, 2017 10:03 pm
Forum: JFreeChart
Topic: change icons in the MinMaxCategory Renderer?
Replies: 3
Views: 5536

change icons in the MinMaxCategory Renderer?

I am trying to create a category plot that has data points that are above or below y = 0 and there is a vertical line connecting the point to y=0. I tried using the MinMaxCategoryPlot with some success. I use two rows, one for the data values and one that is all zero. Then 'all' I need to do is turn...
by jt_swanson
Sun Sep 10, 2017 6:23 pm
Forum: JFreeChart
Topic: How to create a category chart with lines to x axis?
Replies: 3
Views: 5780

Re: How to create a category chart with lines to x axis?

Thanks, My first attempt at extending MinMaxCategoryRenderer ran into the problem that drawItem uses a lot of private variables, so using it as a template for an alternate method doesn't seem practical. I'll have a look at XYPlot. I did get a partial workaround by creating basically a null icon, and...
by jt_swanson
Sat Sep 09, 2017 10:51 pm
Forum: JFreeChart
Topic: How to create a category chart with lines to x axis?
Replies: 3
Views: 5780

How to create a category chart with lines to x axis?

I'm trying to create a chart like this one: http://www.statmethods.net/stats/images/CooksD.png I thought I wanted a CategoryPlot, I can create all aspects of the plot except having the lines from the data values to the x axis. I have something very close just going from the MinMaxCategoryPlotDemo1 e...
by jt_swanson
Sat Sep 02, 2017 11:38 pm
Forum: JFreeChart
Topic: Add data as shapes only in Polar Plot
Replies: 5
Views: 6554

Re: Add data as shapes only in Polar Plot

John's suggestion worked great. Since I had series to plot either as points or not, I added a flag as to whether to plot normally or plot just points. I included the sort of thing I did below. class PointPolarItemRenderer extends DefaultPolarItemRenderer { private ArrayList<Boolean> drawPoints = nul...
by jt_swanson
Wed Aug 30, 2017 4:21 pm
Forum: JFreeChart
Topic: Add data as shapes only in Polar Plot
Replies: 5
Views: 6554

Re: Add data as shapes only in Polar Plot

John,

Thanks, that is an excellent suggestion. I'm working on other stuff today, but I'll post again after I have a chance to try it out.
by jt_swanson
Tue Aug 29, 2017 11:50 pm
Forum: JFreeChart
Topic: Add data as shapes only in Polar Plot
Replies: 5
Views: 6554

Re: Add data as shapes only in Polar Plot

Maybe I wasn't clear. The part that works is drawing the concentric circles. The part that does not work is that I then want to plot points, just like you would in a scatter plot, except in polar coordinates. So if I had a green circle, then a yellow band, then a red band, the user could see how man...
by jt_swanson
Tue Aug 29, 2017 10:36 pm
Forum: JFreeChart
Topic: Add data as shapes only in Polar Plot
Replies: 5
Views: 6554

Add data as shapes only in Polar Plot

I had what I thought was a simple problem. I have 2D data expressed as Z-scores, i.e., a distance of 1.98 is 95% confidence, a distance of 2.58 99% confidence and I wanted to plot the points using a polar plot, so the axis would be radial. In addition, I wanted to color each band by probability. The...
by jt_swanson
Thu Apr 25, 2013 7:55 pm
Forum: JFreeChart
Topic: Turn off behavior crosshairs move to mouse click
Replies: 0
Views: 3160

Turn off behavior crosshairs move to mouse click

I have been using the domain and range cross hairs tied to JSliders. People complain that when they right-click on the chart to bring up the pop-up menu, sometimes the cross hairs move to the place in the chart where they clicked. I really only want to move the cross hairs via the the sliders. Is th...
by jt_swanson
Thu Jun 14, 2012 4:17 pm
Forum: JCommon
Topic: Is it possible to add a Range Marker to a CombinedRange plot
Replies: 1
Views: 38904

Re: Is it possible to add a Range Marker to a CombinedRange

I found the solution to this. I keep thinking with the combined plot that I can add objects to the combined plot. What worked was to add two range markers to each of the individual plots before I combined them. I thought that wouldn't work, since I did not define a range individually for them, but i...
by jt_swanson
Tue Jun 12, 2012 11:45 pm
Forum: JCommon
Topic: Is it possible to add a Range Marker to a CombinedRange plot
Replies: 1
Views: 38904

Is it possible to add a Range Marker to a CombinedRange plot

I need to emphasize the y = 0.0 line in my CombinedRangeXYPlot. Naively, I thought I could do this- NumberAxis sharedAxis = new NumberAxis("residual lnk"); CombinedRangeXYPlot plot = new CombinedRangeXYPlot(sharedAxis); ValueMarker zeroMarker = new ValueMarker(0.00, Color.RED, new BasicStroke(2.0f))...
by jt_swanson
Wed Jun 06, 2012 1:36 am
Forum: JFreeChart
Topic: Stymied trying to draw a simple box on a chart
Replies: 2
Views: 3916

Re: Stymied trying to draw a simple box on a chart

4a. myrenderer.addAnnotation(myanna, Layer.BACKGROUND);

allows me to click on the datapoint, so I can turn the annotation on and off.