[R] Better y-axis labels, and x-axis scaling
Hello I'm plotting some data using matplot with a logarithmic scale on the y-axis. This is the call to matplot I'm using: matplot(turns, distances, type = l, log = y, lty = solid, ylab = , xlab = Time steps, col = c(black)) The values for the 'distances' vector are always between 0 and 1. The result can be seen at http://sneakymustard.com/tmp/plot.jpg As you can see, the default y axis labels are not very nice, as it uses irregular intervals. I tried using variations of axis(2, at = pretty(c(0, ceiling(max(distances))), 5)) or yaxp = c(round(mind, 2), round(maxd, 2), -4) in the matplot() call. Is there anything else I could try for better labeling of values between 0 and 1 in a log-scale axis? Hints or pointers to the appropriate docs are appreciated :) Also, is there a command/option to change the plotted spacing between the labels in a plot? In the plot above, I'd like to make the space between each label in the x-axis smaller (maybe something similar to the width/space options in barplot()). Thanks in advance, Andre __ R-help@stat.math.ethz.ch 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.
Re: [R] Better y-axis labels, and x-axis scaling
On Thu, 2006-11-02 at 23:10 +, Ben Bolker wrote: If you really wanted equal scaling you could do [...] Thanks Ben. Do you know how the the x axis can be made shorter? Best regards, Andre __ R-help@stat.math.ethz.ch 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.
Re: [R] Better y-axis labels, and x-axis scaling
On Thu, 2006-11-02 at 21:49 -0200, Andre Nathan wrote: Do you know how the the x axis can be made shorter? I did it setting the width in the postscript() call, not sure if that's the best way. Andre __ R-help@stat.math.ethz.ch 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.
[R] Multiple barplots on the same axis
Hi R newbie here :) I need to plot 3 barplots in the same axis, something like | | ___ | | | _| | _| | _ | _ | || | _ | || | _ | || | | | || || || || || || || || | -+- | v1 v2 v3 Is there any documentation describing how to achieve that, and what data file layout would make the job easier? Thanks in advance, Andre __ R-help@stat.math.ethz.ch 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.