आर

2013-01-01 25 views
13

में चित्रमय चार्ट मैं चित्रमय चार्ट विकसित करने की कोशिश कर रहा हूं। आर में ऐसे चार्ट विकसित करना संभव है? enter image description hereआर

myd <- data.frame (categories = c("Planes", "Ships", "Cars", "Trains"), 
values = c(15, 18, 22, 11)) 

घटक प्रतीक यहां हैं:

enter image description here enter image description here enter image description here enter image description here

+3

यह निश्चित रूप से है * संभव * लेकिन यह शायद काफी काम का समय लगेगा। Http://stackoverflow.com/questions/2181902/how-to-use-an-image-as-a-point-in-ggplot पर एक नज़र डालें और 'plotrix' पैकेज –

+5

में 'multsymbolbox' को भी देखें आरेख के प्रकार Tufte परीक्षण flunks। बहुत कम जानकारी के लिए बहुत अधिक स्याही। इससे भी बदतर, यह कहना मुश्किल है कि एक कार, उदाहरण के लिए, एक से अधिक ट्रेनों के लायक है। साइंस जर्नल में –

+1

सच हो सकता है, लेकिन फिर भी घर/संसद मंजिल, व्यापार मीटिंग या आम सार्वजनिक बैठकों में उपयोगी हो सकता है। – shNIL

उत्तर

6

उम्मीद है कि इस उपयोगी होगा चार अपने घर/संसद मंजिल

संपादित करें: मैं भूल जाते हैं मेरा reference और उल्लेख करें मैं कुछ स्पष्टीकरण जोड़ता हूं। enter image description here

library(lattice) 
library(grid) 


imgs.names <- c('WNinq','7dqJM','9E3Wj','tStmx') 
library(png) 
images <- lapply(imgs.names, function(x) 
    readPNG(paste(mypath,x,'.png',sep=''),native=TRUE)) 
## I generate some data because we don't give a reproducible example 
x <- c(rep(0,4),rep(10,9),rep(20,3),rep(5,8),rep(4,8),rep(15,4),rep(13,8)) 
barchart(1:4~x, origin=0, col="yellow",xlim=c(0,30), 
      xlab ='values',ylab='categories',title = 'Pictorial', 
      scales = list(
       y = list(cex=2,col='blue', at = 1:4,labels = c('Trains','Cars','Ships','Planes')), 
       x = list(cex=2,col='blue',at=seq(0,30,by=10)) 
       ), 
      panel=function(x, y, ...) { 
       panel.fill(col = rgb(1,1,205/255)) ## I had to pick up the same yellow color!! 
       panel.grid() 
       lapply(1:4,function(id){ 
       grid.raster(images[[id]], x=x[which(y==id)], y=y[which(y==id)], 
          default.units="native", 
          just="left", 
          width =unit(2, "native"), 
          height=unit(0.7, "native")) 
       } 
      ) 
      } 
     ) 
+0

धन्यवाद – shNIL

+0

@shNIL पूछने के लिए यह मंजिल @ एफपीआरआर के लिए धन्यवाद होगा, मुझे आश्चर्य है कि वे इस तरह के आरेख के लिए पूछते हैं! – agstudy