plots_ss, when selecting points for line, misclicks on some devices

This was an example for class and we could not get it right. My R script is as follows
download.file("http://www.openintro.org/stat/data/mlb11.RData", destfile="mlb11.RData")
load("mlb11.RData")
plot(mlb11$at_bats,mlb11$runs)
cor(mlb11$at_bats,mlb11$runs)

plot_ss(mlb11$at_bats,mlb11$runs,showSquares = TRUE)

After running that last line, you are able to select two points in the plot to create a line. On my MAC and my instructors PC, when you click in the plot, the blue icon pops up in the correct place but the x that is created in the plot is placed up and to the left, pretty far away from the original position. You can see where the x was placed in this picture. I clicked in the bottom right-most corner above the number 5800.

On my windows 10 PC however, the clicks register right where you place them. (which is the expected behavior).

Does anyone know of a good quick fix for this? I have some extra credit at stake!

I am using R cloud, my professor was using the actual application installed on her PC both experienced the same problem.
my version is R 4.1.3
I tried different resolutions, different pane sizes, older versions of R, I was also able to recreate the problem on a windows 11 laptop. I also tried the dev.off to reset the graphics device.

Seems like a bug in the RStudio viewer: works as expected with standalone R on the command line, and with calling a system-specific graphics device directly.

Turns out, there have been two bug reports in 2021 (even one in 2020), that can be found on Github. Also, that probably explains the meaning of this topic.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.