Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rotating the axislabel misalign lineplot #8

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 2 comments
Open

Rotating the axislabel misalign lineplot #8

GoogleCodeExporter opened this issue Mar 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 Matthias...@googlemail.com on 6 Nov 2013 at 9:38

Attachments:

@GoogleCodeExporter
Copy link
Author

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

Original comment by Matthias...@googlemail.com on 6 Nov 2013 at 9:54

@GoogleCodeExporter
Copy link
Author

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 safonteo...@gmail.com on 11 Apr 2014 at 5:01

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant