Hi Sofia, welcome!, is better if you make your questions with a REPRoducible EXample (reprex) but here is an example with some built-in data
library(dplyr)
library(ggplot2)
sample_data <- iris[,c("Sepal.Width", "Sepal.Length")]
sample_data %>%
filter(Sepal.Length <= 4.6) %>% # Filtering up to a maximum value
ggplot(aes(Sepal.Length, Sepal.Width)) + # Ploting the result
geom_point()