Skip to content

A beginner's problems with plotting

2 messages · Jeremy Z Butler, Martin Maechler

#
Hi,
How would I go about plotting all 8 columns of a data.frame on a simple line
graph. i.e. eight lines and sets of points, differentiated by line pattern or
colour)?

An what further arguments would I need to invoke a log scale on the y-axis of
that same plot (normal x-axis)?

Cheers, Jeremy
#
Jeremy> How would I go about plotting all 8 columns of a
    Jeremy> data.frame on a simple line graph. i.e. eight lines
    Jeremy> and sets of points, differentiated by line pattern
    Jeremy> or colour)?

help(matplot) and its examples;
also as you might want a legend anyway 
help(legend) and its examples

{and there is a "lattice" way to do this...}

    Jeremy> An what further arguments would I need to invoke a
    Jeremy> log scale on the y-axis of that same plot (normal
    Jeremy> x-axis)?

matplot(........., log = "y")

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/