[R] How to use contour plot?

Luigi Marongiu m@rong|u@|u|g| @end|ng |rom gm@||@com
Tue Nov 16 09:45:34 CET 2021


Hello,
I have a dataframe with 3 values and that I would like to plot with contour:
```
> head(df)
   Y                       X      Z
1 0.0008094667  50     1
2 0.0012360955  50     1
3 0.0016627243  50     1
4 0.0020893531  50     1
5 0.0025159819  50     1
6 0.0029426108  50     1
> contour(df$X, df$Y, df$Z)
Error in contour.default(df$X, df$Y, df$Z) :
increasing 'x' and 'y' values expected
```
Y is increasing, whereas X is decreasing. How shall I set the function?
Thank you



More information about the R-help mailing list