When plotting this data the x and y labels the default label points have multiple decimal places e.g. 0.02999999999999999989 rather than a sensible point like 0.03.
I've tried specifying limits and breaks with scale_y_continuous() function amongst other things.
ggplot(data, aes(x, y, col = z)) +
geom_point(size = 2) +
scale_y_continuous(limits = c(-0.03, 0.03), breaks = seq(-0.03, 0.03, 0.01))
I am able to change the position of label points by playing with breaks = seq()
. In the case of the above code I expect the y-axis to go from -0.03 to 0.03 with label points every 0.01. However they still don't plot exactly as specified and display values with numerous decimal places as in the default plot. e.g I expect a label at 0.01 but get 0.0100000000000000019
Edit: The error is replicated when running M. Viking's code to plot the iris dataset.