I have a data frame including X, Y and the third column define Chi square values. I would like to overlay a contour of constant chi squares (i.e. 1 sigma, 2 sigma etc.) The figure is what I'm looking for. Any idea how to make a contour like this?
Asked
Active
Viewed 615 times
0

Soheil
- 193
- 4
- 10
-
1Please make this question *reproducible*. This includes code you've tried (including listing non-base R packages) and sample *unambiguous* data (e.g., `dput(head(x))` or `data.frame(x=...,y=...)`). Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Jan 29 '20 at 17:07
-
I think you can use `bquote` to get mathematic expressions like that on a plot, see [`?plotmath`](https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/plotmath.html) for some lesser-known functions within that type of environment. – r2evans Jan 29 '20 at 17:08
-
That looks like plots I have seen for profile likelihoods. Perhaps if you posted some specific code that could be the basis for plotting you could get more specific answers. – IRTFM Jan 29 '20 at 17:39
-
Perhaps this can serve as a starting point: https://stackoverflow.com/search?q=%5Br%5D+contourplot – IRTFM Jan 29 '20 at 17:50
1 Answers
0
Sorry guys that I wasn't clear enough. Anyhow I found the best possible answer in this link:Contour plot via Scatter plot

Soheil
- 193
- 4
- 10