0

I am trying to plot a set of data in R

x <- c(1,4,5,3,2,25)

my Y scale is fixed at 20 so that the last datapoint would effectively not be visible on the plot if i execute the following code

plot(x, ylim=c(0,20), type='l')

i wanted to show the range of the outlying datapoint by showing a smaller box above the plot, with an independent Y scale, representing only this last datapoint.

is there any package or way to approach this problem?

4

1 に答える 1