JFreeChart: How to plot a line graph and a scatter on same chart
问题 i have two sets of data int[] x1 = {1,2,3,4,5,6,7,8,9,10}; int[] y1 = {1,2,3,5,6,8,9,10,14,11}; int[] x2 = {1,2,3,4,5,6,7,8,9,10}; int[] y2 = {0,2,3,5,0,8,9,8,14,11}; int[] z2 = {1,2,3,1,2,3,1,2,3,1}; I want to plot the x1,y1 as an XYLineChart and then plot x2,y2 as a scatter on the same plot without a line. I also need each scatter point of xy,y2 to be a different color depending on the value of z2 (1=Color.red, 2=Color.green, 3=Color.blue) How can i do this? So far i have: JPanel panel_1 =