I am using R (ggplot2) to plot a graph. There I need to manually adjust the limits.
When I use the following code I get the warning: "Scale for 'y' is already present. Adding another scale for 'y', which will replace the existing scale."
plot = ggplot(Light.d220, aes(x=V1, y=V2)) +
geom_raster(aes(fill=V3), interpolate=TRUE, hjust = 0, vjust = 0) +
scale_fill_gradient(low = "red",high = "green") +
guides(fill = guide_colorbar(barwidth = 1, barheight = 10, title="Lux")) +
labs(x = "X", y = "Y", title= "Illumination at 2,2 m [Lux]") +
geom_text(aes(label=V3),size=5) +
xlim(-0.6,4.4) +
ylim(0,1.02) +
scale_y_reverse()
I know I get this error because of the "ylim", but I have not clue how to correct this.
It would be very nice if you could tell me, how to solve this.
Thank you very much :-)