Dear list, why does the distance between the axis labels and the tick marks looks different for x axis and y axis in the plot (see code below). In fact, the x axis labels look furthest from the tickmarks than in the y axis. How can I make them look the same? par(mfrow=c(1,1), cex.axis = 0.5, cex.lab = 0.5) plot(1,1, axes = F) axis(1) axis(2) Thanks in advance Jonas [[alternative HTML version deleted]]
See the 'mgp' argument to par(). You should be able to change mgp to get what you want. -Don At 5:58 PM +0100 10/13/09, jonas garcia wrote:>Dear list, >why does the distance between the axis labels and the tick marks looks >different for x axis and y axis in the plot (see code below). >In fact, the x axis labels look furthest from the tickmarks than in the y >axis. >How can I make them look the same? > > par(mfrow=c(1,1), cex.axis = 0.5, cex.lab = 0.5) >plot(1,1, axes = F) >axis(1) >axis(2) > >Thanks in advance > >Jonas > > [[alternative HTML version deleted]] > >______________________________________________ >R-help at r-project.org mailing list >https://*stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://*www.*R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.-- -------------------------------------- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA 925-423-1062
They probably look different because the y-axis distance is to the bottom of the number and the x-axis to the top; character adjustment is putting the actual locations in the 'same' place but with opposing orientation. Try fooling about with the mgp argument in axis(): par(mfrow=c(1,1), cex.axis = 0.5, cex.lab = 0.5) plot(1,1, axes = F) axis(1, mgp=c(3,0.7,0)) axis(2, mgp=c(3,1,0))>>> jonas garcia <garcia.jonas80 at googlemail.com> 10/13/09 5:58 PM >>>Dear list, why does the distance between the axis labels and the tick marks looks different for x axis and y axis in the plot (see code below). In fact, the x axis labels look furthest from the tickmarks than in the y axis. How can I make them look the same? par(mfrow=c(1,1), cex.axis = 0.5, cex.lab = 0.5) plot(1,1, axes = F) axis(1) axis(2) Thanks in advance Jonas [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}