Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205301

R basic graphics xlim and ylim

$
0
0

Have this assignment cannot figure out You can draw the picture by following these steps:

Make a vector years1 containing values 100, 101, ..., 150 and a vector years2 containing values 151, 152, ..., 200. Using function plot(), plot the values of vector first. At the same time, define the size of the drawing area with arguments xlim and ylim so that also the values at years 151-200 will fit the picture. Use the arguments main, xlab and ylab to name the picture and the axes. Define the applied plotting symbol with the argument pch. Add a smooth black line using the values in logistic_model. You can use lines(). Add the observed values at years 151-200 with points(). Find the maximum of vector "first" and mark it to the picture with text(). Another option is to use locator(). The red curve is the function f(x) = ((logistic_model[51]-100)/exp(-150))*exp(-x)+100, in the time interval x=[150, 200]. You can use the function curve() to add it. Add the legend with legend().


Viewing all articles
Browse latest Browse all 205301

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>