r - How to modify ggplot2 scater plot -


here sample dataset:

df1 = data.frame(count.amp = c(8,8,1,2,2,5,8), count.amp.1 = c(4,4,2,3,2,5,4)) 

i tried

library(ggplot2) qplot(count.amp,count.amp.1, data=df1)   

is there ways plot in such way size of dot proportional number of elements in each dots?

yes, broadly speaking looking @ creating bubble plot, code:

df1 = data.frame(count.amp = c(8,8,1,2,2,5,8), count.amp.1 = c(4,4,2,3,2,5,4)) df1$sum <- df1$count.amp + df1$count.amp.1 ggplot(df1, aes(x=count.amp, y=count.amp.1, size=sum),guide=false)+   geom_point(colour="white", fill="red", shape=21)+ scale_size_area(max_size = 15)+   theme_bw() 

would give that: bubble plot wasn't clear me yo mean number of elements on principle can pass figures size= desired result.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -