2017-08-03 15 views
5

Jupyter not defterinde R harfini kullanarak, önce plot boyutunu evrensel olarak ayarlıyorum. İkincisi, farklı bir boyutta tek bir arsa çizmek istiyorum. Gördüğünüz gibiR - Jupyter'de ggplot çizim boyutunu değiştirme

## load ggplot2 library 
library("ggplot2") 
## set universal plot size: 
options(repr.plot.width=6, repr.plot.height=4) 

## plot figure. This figure will be 6 X 4 
ggplot(iris, aes(x = Sepal.Length, y= Sepal.Width)) + geom_point() 

## plot another figure. This figure I would like to be 10X8 
ggplot(iris, aes(x = Sepal.Length, y= Sepal.Width)) + geom_point() + HOW DO i CHANGE THE SIZE? 

, bir 10x8 olmak üzere ikinci arsa (ve sadece ikinci arsa) değiştirmek istiyorum. Bunu nasıl yaparım?

Potansiyel olarak yetersiz bir soru için özür dilerim, çünkü arsa boyutlandırması genellikle Rstudio'da bir sorun değildir. İşte

cevap

4

gitmek:

library(repr) 
options(repr.plot.width=10, repr.plot.height=8) 
ggplot(iris, aes(x = Sepal.Length, y= Sepal.Width)) + 
    geom_point() 
+0

'kitaplığı (repr)' kısmı bana gereksiz – eddi

İlgili konular