load("E:/R/semestr5/lab7_zasol/7a/d1.Rdata")
dane<-gather(d1,key="key",value="value",-c(1:5))


dane$y<-c(rep(1,540),rep(2,540),rep(3,540),rep(4,540),rep(5,540),rep(6,540),rep(7,540),rep(8,540))

ggplot(dane, aes(as.factor(pol), y)) +
   geom_raster(aes(fill = value))+
  labs(title = "Wykres zależności pol od S",
       x = "Oś pol",
       y = "Oś S")+
  scale_y_continuous(breaks = seq(1, 8, 1))+
  scale_fill_gradient(low = "lightblue", high = "darkblue")

wyk<-ggplot(dane, aes(as.factor(pol), y)) +
   geom_raster(aes(fill = value))+
  labs(title = "Wykres zależności pol od S",
       x = "Oś pol",
       y = "Oś S")+
  scale_y_continuous(breaks = seq(1, 8, 1))+
  scale_fill_gradient(low = "lightblue", high = "darkblue")
plotly::ggplotly(wyk)