Displaying more datapoints than tick marks in a line graph

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ccapano
Posts: 12
Joined: Mon Sep 12, 2005 9:22 pm
Location: Frederick, Maryland
Contact:

Displaying more datapoints than tick marks in a line graph

Post by ccapano » Tue May 02, 2006 3:45 pm

Is there a way I can display X amount of datapoints and have the x-axis only draw a tick mark at specified intervals

(example: X tick marks are every 5, but display a datapoint for every 1)

skunk
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia

Post by skunk » Tue May 02, 2006 4:58 pm

It depends on the type of chart. Are you trying a CategoryPlot or an XYPlot?

ccapano
Posts: 12
Joined: Mon Sep 12, 2005 9:22 pm
Location: Frederick, Maryland
Contact:

Post by ccapano » Tue May 02, 2006 5:19 pm

I am using this Chart: ChartFactory.createLineChart3D

and a DefaultCategoryDataset

with a CategoryPlot

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed May 03, 2006 6:17 am

If your x-axis contains numerical data, you should use XYPlot.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

ccapano
Posts: 12
Joined: Mon Sep 12, 2005 9:22 pm
Location: Frederick, Maryland
Contact:

Post by ccapano » Wed May 03, 2006 12:29 pm

Line Chart returns a Category Plot, is there a way to conver this to an XY? Simply calling chart.getXYPlot returns a class cast exception

Locked