Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You may also have a look at <code>scale_size_area</code> in <code>ggplot</code></p> <pre><code># you need to keep your data in a data.frame df &lt;- data.frame(x = x, y = y, weighting = weighting) ggplot(data = df, aes(x = x, y = y, size = weighting)) + geom_point() + scale_size_area() </code></pre> <p><strong>Update, on <code>cex</code> and scaling of point size</strong><br> Because the topic of the question is <code>cex</code>, I take the opportunity to cite <a href="https://stat.ethz.ch/pipermail/r-help/2011-January/265475.html" rel="nofollow">a post by @Bert Gunter</a> on R-help: </p> <p>"Here's the problem: in order to accurately represent the value, the "point" = circle <em>area</em> must be proportional to the value. That is, the eye "sees" the areas, not the radii, as the point "size." A delightful reference on this is Howard Wainer's 1982 or so (can't remember exactly) article in THE AMERICAN STATISTICIAN, "How to Graph Data Badly" (or maybe "Plot" Data).</p> <p>Anyway, using cex, I have no idea whether a point drawn with cex = 1.23 is 1.23 times the area or radius -- or neither -- of a point drawn with cex =1. Indeed, it might vary depending on the implementation/OS/graphics fonts. So it seems better to me to "draw" the point with symbols(), where you can have complete control over the size.</p> <p>Obviously, let me know if I'm wrong about this." End quotation.</p> <p>In the same thread @Gabor Grothendieck points to <a href="http://flowingdata.com/2010/11/23/how-to-make-bubble-charts/" rel="nofollow">this nice article</a>, where the <code>base</code> function <code>symbols</code> is used. One example where "[c]ircles [are] incorrectly sized by radius instead of area. Large values appear much bigger", and one where "Circles [are] correctly sized by area", and also where the <code>inches</code> argument is used to set size the largest bubble. I think this might be a <code>base</code> equivalent to <code>scale_size_area()</code> in <code>ggplot</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload