When I run this line:
plot(z$prod,z$x, type="l")
It plots the values as dashes and ignores the type command.
I can easily get it to plot the line if I run:
points(z$prod, z$x, type="l")
What is it about plot() that ignores the type command while points() recognizes it?
z$prodis a factor with 4 levelsz$xis a num[1:6]
This is driving me crazy!
Expanding on my comment…
The second paragraph you read when looking up
?plot(you did read?plotright?) is this:Then continue reading about the
typeargument:Typing
methods(plot)lists a whole bunch of functions. You note that your x values are a factor. Hmmm. There’s aplot.factorlisted in there. I wonder what it does. Turning next to?plot.factorwe see that:And further,
There. Mystery solved.