Re: [R] How to show a specific value of a ggplot2

2022-05-27 Thread Rui Barradas
Hello, I think the function find_x_from_profile below does what you want. I have used the data set in the first example of ?readARFF, the built-in and all-present data set iris. The function returns a one line data.frame whose column names are "x" and "y". Pass the y-axis value in argument

Re: [R] How to show a specific value of a ggplot2

2022-05-27 Thread Neha gupta
I am sorry for that. I used library(farff) library(mlr3learners) library(mlr3filters) library(mlr3extralearners) library(mlr3) library(DALEX) library(DALEXtra) data = readARFF("ant.arff") index= sample(1:nrow(data), 0.7*nrow(data)) train= data[index,] test= data[-index,] task =

Re: [R] How to show a specific value of a ggplot2

2022-05-26 Thread Rui Barradas
Hello, If you cannot determine the exact value of y for given x, then isn't your problem how to determine an approximate value of y? Once you have it, it's easy to plot it. With newdata = data.frame(x = 75, y = ???), ggplot(mydata, mapping = aes(x, y)) + geom_point(color = "black") +