Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ethan A Merritt Newsgroups: comp.graphics.apps.gnuplot Subject: Re: help, dotplot and horizontal boxplot Date: Mon, 06 Jan 2014 13:02:30 -0800 Organization: gnuplot development Lines: 49 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit Injection-Date: Mon, 6 Jan 2014 21:02:33 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="8e86a57dfa599721f116da4577f3d1af"; logging-data="14456"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4Yiv7wV4n9kW4DXuLO9GV" User-Agent: KNode/4.10.5 Cancel-Lock: sha1:7gl/tqRrOlqw7Ish3xV1SFdHhaM= Xref: csiph.com comp.graphics.apps.gnuplot:2227 Tom wrote: > Hello, > > I tried to plot dotplot in gnuplot but unable to find a way > to do it. is there a way to do dotplot as shown below > in gnuplot > http://en.wikipedia.org/wiki/Dot_plot_(statistics)? Note that the use of dots in the specific examples on that URL is a historical artifact. When preparing such a plot by hand it is convenient to draw a dot for each new point as it is tallied, resulting in a stack of dots at each x coordinate rather than a box or line of equivalent height. If the tally is done by computer then it is more common to simply draw a vertical bar. The gnuplot equivalent command filters the input data using either "smooth frequency" or "smooth kdensity". gnuplot> help smooth frequency The `frequency` option makes the data monotonic in x; points with the same x-value are replaced by a single point having the summed y-values. To plot a histogram of the number of data values in equal size bins, set the y-value to 1.0 so that the sum is a count of occurances in that bin: Example: binwidth = # set width of x values in each bin bin(val) = binwidth * floor(val/binwidth) plot "datafile" using (bin(column(1))):(1.0) smooth frequency See also http://gnuplot.sourceforge.net/demo/smooth.html If you have in mind a more complex plot in which information is attached to individual dots in the "dot plot" (color? size?), I'd be interested in seeing an real world example of use. I can't at the moment think how you would do that in gnuplot, but it seems like a reasonable feature request. Ethan > Another question is about boxplot. > The boxplot in gnuplot displays the box vertically. > Can a box be displayed horizontally as shown below > http://en.wikipedia.org/wiki/File:Boxplot_vs_PDF.svg > ? No.