I would like to have a way to automatically change the line color and line 
style.  

Below is an example of the items I am plotting.  I've contemplated coming up 
with a list of desired colors and styles, but I am hoping there is an automated 
way for this to be accomplished as the number of lines I will be adding to a 
plot will be changing over time. 

Thanks again for any insights and feedback.


plot(1,1, xlim=c(1000,4000), ylim=c(100000,800000), col=0, 
    xlab=c("Sq. Footage"), ylab=c("Cost ($)"))

square_footage_values<-c(1000:4000)
initial_val<-300
    
cost_per_square_footage_vals<-seq(from=100, to=200, by=10)
for(ii in 1:length(cost_per_square_footage_vals))
{
        lines(square_footage_values, 
cost_per_square_footage_vals[ii]*square_footage_values)
}

______________________________________________
R-help@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.

Reply via email to