How does the "plot (qnorm)" command in R work?

When I run the command plot(qnorm)

, it creates the following graph: enter image description here

But I don't understand how does this command work to create a graph?

+3


source to share


1 answer


qnorm

is a function, so it is very important to look for a function that follows the S3 convention plot.function

. If you read the help, you can see that this function:

Draws a curve corresponding to the function along the interval '[from to]'. "curve" can also display the expression in the variable 'xname', the default is 'x'.

Since you are not specifying a range, further down in the help documentation, it specifies:



What happens when neither '/' to 'nor' xlim 'is specified as x-limits is a complicated story. For "plot ()" and for 'curve (add = FALSE)' the default values ​​are (0, 1) . For curve (add = NA) 'and' curve (add = TRUE) 'default values ​​are taken from x-limits used for the previous plot. (This differs from R versions prior to 2.14.0.)

(selection is highlighted for selection).

So, your call is the plot(qnorm)

same curve(qnorm, from = 0, to = 1)

for plot.function

.

+6


source







All Articles