s-news
[Top] [All Lists]

[S] Problems with Bubble plots

To: "S-news (E-mail)" <s-news@wubios.wustl.edu>
Subject: [S] Problems with Bubble plots
From: "Steven P. Millard" <steven.p.millard@cwix.com>
Date: Fri, 19 Feb 1999 09:47:37 -0800
Cc: "S-PLUS Technical Support (E-mail)" <support@statsci.com>
Organization: PSI
Reply-to: "smillard@probstatinfo.com" <smillard@probstatinfo.com>
Sender: owner-s-news@wubios.wustl.edu
Hello,

I'm using S-PLUS 4.5, Release 2.  I'm trying to figure out the proper 
arguments to give to the Bubble Plot dialog box (actually the 
Line/Scatter Plot dialog box) in order to make the results consistent 
with calling the command line function symbols() and using the circles 
argument.

Consider the following (with apologies to Bill Nye the Science Guy):

  x <- c(0:10, 5, 5)
  y <- c(0:10, 5, 4 + sqrt(2))
  z <- c(rep(0,11), 1, 2)
  plot(x, y, type = "n")
  symbols(x, y, circles = sqrt(z), add=T)

This yields a plot with two circles, one of which is supposed to be 
twice as large in area as the other, although I'm not quite sure why 
they don't share the point (4,4).

When I create a "bubble plot" by using the pull-down menu or 2D Graph 
palette, I put x in the "x Column(s)" box, y in the "y Column(s)" box, 
but I'm not sure whether I'm supposed to put z or sqrt(z) in the "z 
Column(s)" box (the help file gives no information on this point). 
 Either way, the resulting plot shows bubbles for the points where z 
has values of 0, so there is an inconsistency between the way a bubble 
plot works and the symbols() function.

Can someone help me figure out what I'm supposed to put in the "z 
Column(s)" box and whether bubble plot is really plotting circles in 
the correct way (i.e., the *area* of the circle is proportional to what 
you put in the "z Column(s)" box)?

Thanks so much for your time and help!


Sincerely,

--Steve M.

  _____________
  |    ***    |  Steven P. Millard, Ph.D.
  |     *     |
  | *   *   * |  P robability,      TEL:    206-528-4877
  |   * * *   |  S tatistics &      FAX:    206-528-4802
  |     *     |  I nformation       E-mail: SMillard@ProbStatInfo.com
  |     *     |                     Web:    www.ProbStatInfo.com
  |    ***    |  7723 44th Avenue NE
  |___________|  Seattle, WA 98115-5117 USA



-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] Problems with Bubble plots, Steven P. Millard <=