0

my code:

bike <- read.csv('bikeshare.csv',sep=',')
library(ggplot2)
library(plotly)
library(dplyr)
pl2 <- ggplot(filter(bike,workingday == 0), aes(hour,count))
pl2 <- pl2+ geom_point()
pl2 <- pl2 + geom_point(position=position_jitter(w=1,h=0),aes(color = temp),alpha=0.5)

pl2 <- pl2 + scale_color_gradientn(colours = c('dark blue','blue','light blue','light green','yellow','orange','red'))
print(pl2 + theme_bw())
stefan
  • 90,330
  • 6
  • 25
  • 51
  • 3
    Welcome to SO! Unfortunately we don't have your data and can't run your code to check what's the reason for the issue in your case. To help you It would be easier if you provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) including a snippet of your data or some fake data shared via `dput()`. – stefan Sep 24 '22 at 07:48
  • Your data set looks fairly big, judging from the error, so for @stefan 's request, you want to do bike |> head() |> dput() – Isaiah Sep 24 '22 at 09:12
  • 1
    Something else you could do is to simplify your script. You have two geoms, two aesthetics, a scale, alpha, a theme, and jitter. I'd try deleting each of these and seeing if you can narrow down the problem. – Isaiah Sep 24 '22 at 09:34

0 Answers0