jmathplot icon indicating copy to clipboard operation
jmathplot copied to clipboard

Rotating the axislabel misalign lineplot

Open GoogleCodeExporter opened this issue 10 years ago • 2 comments

Rotating the axislabel misalign the line plots. 
I'm adding some line plots to my graph and want to rotate the axis label of the 
y-axis.

Code Used: 

panel.getAxis(0).setLabelPosition(0.5, -0.15); 
panel.getAxis(1).setLabelAngle(-Math.PI / 2);
panel.getAxis(1).setLabelPosition(-0.15, 0.5); What is the expected output? 

OS: Windows XP SP3
JAVA: 1.7

Original issue reported on code.google.com by [email protected] on 6 Nov 2013 at 9:38

Attachments:

GoogleCodeExporter avatar Mar 14 '15 13:03 GoogleCodeExporter

Same problem with this: 
https://code.google.com/p/jmathplot/wiki/CustomPlotExample

Original comment by [email protected] on 6 Nov 2013 at 9:54

GoogleCodeExporter avatar Mar 14 '15 13:03 GoogleCodeExporter

The same problem with a scatter plot.

NetBeans 7.4 & Java 1.7
Windows 7 Home Premium

Code used:

double[] x={0.1,0.5,1,2.5,5,10,25,50};
double[] y={1633,7610,14930,35347,69403,141643,402754,850161};
Plot2DPanel plot=new Plot2DPanel();
plot.addScatterPlot("Tetrachloroethene",x,y);
BaseLabel title=new BaseLabel("Tetrachloroethene",Color.RED,0.5,1.1);
plot.addPlotable(title);
plot.setAxisLabels("Concentration (ug/L)","Response");
plot.getAxis(0).setLabelPosition(0.5,-0.15);
plot.getAxis(1).setLabelPosition(-0.15,0.5);
plot.getAxis(1).setLabelAngle(-PI/2);
JFrame frame=new JFrame("Plot");
frame.setSize(640,480);
frame.setContentPane(plot);
frame.setVisible(true);

Original comment by [email protected] on 11 Apr 2014 at 5:01

Attachments:

GoogleCodeExporter avatar Mar 14 '15 13:03 GoogleCodeExporter