I have some problems with axis labels when using the polar axis, if I set the X and Y label they appear in the wrong place.
When using the polar axis;
- x coordinate is the angle (azimuth, phi)
- y coordinate is the radius (zenith, theta).
However, the xlabel is printed where one would expect it to be in a cartesian plot, except that that is now the y axis (using TeXLive 2015, PGFPlots v1.12.1). Similar for the y label is is located where the y axis would be in a cartesian plot, except that is it rotated.
Here I used:
xlabel={Azimuth [rad] (x-label)},
xlabel style={red},
ylabel={Zenith [rad] (y-label)},
ylabel style={blue},
This is how it looks in TeXLive 2015, PGFPlots v1.12.1:
This is how it looks in TeXLive 2013/2014, PGFPlots v1.8/v1.10:
Using some shifts and rotations we get it to look nice, however, those shifts are different for TeXLive 2013-2014 and 2015:
This did require some ugly hacks, for the xlabel:
\coordinate (xlabel) at ([rotate=-45, yshift=1.5cm] xticklabel* cs: 0);
\node[rotate=-45] at (xlabel) { {{ xlabel }} };
The ylabel value is simply entered as xlabel and then shifted with the axis line, but that does not work for 2013/2014.
Should we resort to version detection to make it work in all versions? And will this be fixed in the next PGFPlots? (We created a Python package for plotting which outputs plots as TeX using PGFPlots, so compatibility with older versions would be nice.)