Hi guys,
Sorry if i've not given enough information but i'm having the problem of the JFreeChart plotting slightly off the Y Axis and I can't seem to figure out why.
Currently it's on a timer every one second and gets a random value to plot.
Also is it possible to have two line graphs (time series) plotted on the same graph?
Much Appreciated, Lynzoid.
http://imgur.com/a/PZDrM - graph
http://ideone.com/bnIg6w - code
Line plotting off axis on JFreeChart & two timeseries?
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Line plotting off axis on JFreeChart & two timeseries?
Code: Select all
chart.getXYPlot().setAxisOffset(RectangleInsets.ZERO_INSETS);
Re: Line plotting off axis on JFreeChart & two timeseries?
Hi this still isn't working unless i've put it in the wrong spot?
-
- Posts: 1634
- Joined: Sat Feb 17, 2007 1:51 pm
Re: Line plotting off axis on JFreeChart & two timeseries?
Since I cannot know where exactly you have put the statement, I can only respond with "Maybe, maybe not".lynzoid wrote:Hi this still isn't working unless i've put it in the wrong spot?
You need to place the line
Code: Select all
plot.setAxisOffset(RectangleInsets.ZERO_INSETS);
Re: Line plotting off axis on JFreeChart & two timeseries?
Hi sorry for not giving the full amount of information. The problem ended up being me adding a millisecond rather than a second to the time series and then it plots it based on that.
So I changed it to a second and it fixed it.
My other question is how can I plot two timeseries on the same chart?
-Thanks and sorry!
So I changed it to a second and it fixed it.
My other question is how can I plot two timeseries on the same chart?
-Thanks and sorry!