Hi Akki,
Then you may need to increase y-axis scale by ylim=c(min,max)
Cheers
Nguyen
On 8/12/07, akki [EMAIL PROTECTED] wrote:
Hi,
I have a problem when I want to put a legend on the graph.
I do:
legend(topright, names(o), cex=0.9, col=plot_colors,lty=1:5, bty=n)
but the legend is writen
To: [EMAIL PROTECTED]
Cc: r-help@stat.math.ethz.ch
Subject: [R] Legend on graph
Hi Akki,
Then you may need to increase y-axis scale by ylim=c(min,max)
Cheers
Nguyen
On 8/12/07, akki [EMAIL PROTECTED] wrote:
Hi,
I have a problem when I want to put a legend on the graph.
I do:
legend(topright, names
Hi,
I have a problem when I want to put a legend on the graph.
I do:
legend(topright, names(o), cex=0.9, col=plot_colors,lty=1:5, bty=n)
but the legend is writen into the graph (graphs' top but into the graph),
because I have values on this position. How can I write the legend on top
the graph
If you are asking to have the values plotted on top of the legend,
then you can do the following:
plot(x, y, type='n', ...) # create plot, but don't plot
legend('topright', ...)
lines(x,y) # now plot the data
If you want it outside the plot, check the archives for several examples.
On 8/12/07,