Binary files /tmp/tmpwjq8iwz0/tF08puF8pw/r-cran-plotrix-3.8-1/data/soils.rda and /tmp/tmpwjq8iwz0/qNjkebrTPC/r-cran-plotrix-3.8-2/data/soils.rda differ diff -Nru r-cran-plotrix-3.8-1/debian/changelog r-cran-plotrix-3.8-2/debian/changelog --- r-cran-plotrix-3.8-1/debian/changelog 2021-01-24 20:11:43.000000000 +0000 +++ r-cran-plotrix-3.8-2/debian/changelog 2021-09-15 14:58:09.000000000 +0000 @@ -1,3 +1,11 @@ +r-cran-plotrix (3.8-2-1) unstable; urgency=medium + + * New upstream version + * Standards-Version: 4.6.0 (routine-update) + * dh-update-R to update Build-Depends (3) (routine-update) + + -- Andreas Tille Wed, 15 Sep 2021 16:58:09 +0200 + r-cran-plotrix (3.8-1-1) unstable; urgency=medium * New upstream version diff -Nru r-cran-plotrix-3.8-1/debian/control r-cran-plotrix-3.8-2/debian/control --- r-cran-plotrix-3.8-1/debian/control 2021-01-24 20:11:43.000000000 +0000 +++ r-cran-plotrix-3.8-2/debian/control 2021-09-15 14:58:09.000000000 +0000 @@ -7,7 +7,7 @@ Build-Depends: debhelper-compat (= 13), dh-r, r-base-dev -Standards-Version: 4.5.1 +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/r-pkg-team/r-cran-plotrix Vcs-Git: https://salsa.debian.org/r-pkg-team/r-cran-plotrix.git Homepage: https://cran.r-project.org/package=plotrix diff -Nru r-cran-plotrix-3.8-1/DESCRIPTION r-cran-plotrix-3.8-2/DESCRIPTION --- r-cran-plotrix-3.8-1/DESCRIPTION 2021-01-21 05:50:05.000000000 +0000 +++ r-cran-plotrix-3.8-2/DESCRIPTION 2021-09-08 11:00:02.000000000 +0000 @@ -1,6 +1,6 @@ Package: plotrix -Version: 3.8-1 -Date: 2021-01-21 +Version: 3.8-2 +Date: 2021-09-08 Title: Various Plotting Functions Author: Jim Lemon, Ben Bolker, Sander Oom, Eduardo Klein, Barry Rowlingson, @@ -18,7 +18,7 @@ Description: Lots of plots, various labeling, axis and color scaling functions. License: GPL (>= 2) NeedsCompilation: no -Packaged: 2021-01-20 22:51:56 UTC; root +Packaged: 2021-09-08 10:15:08 UTC; root Depends: R (>= 3.5.0) Repository: CRAN -Date/Publication: 2021-01-21 05:50:05 UTC +Date/Publication: 2021-09-08 11:00:02 UTC diff -Nru r-cran-plotrix-3.8-1/man/clock24.plot.Rd r-cran-plotrix-3.8-2/man/clock24.plot.Rd --- r-cran-plotrix-3.8-1/man/clock24.plot.Rd 2020-01-06 04:55:48.000000000 +0000 +++ r-cran-plotrix-3.8-2/man/clock24.plot.Rd 2021-08-22 07:28:30.000000000 +0000 @@ -2,7 +2,7 @@ \title{Plot values on a 24 hour "clockface"} \usage{ clock24.plot(lengths,clock.pos,labels=0:23,minutes=FALSE, - hm2dec=FALSE,label.pos=NULL,rp.type="r",...) + hm2dec=FALSE,label.pos=NULL,rp.type="r",loglen=FALSE,explab=FALSE,...) } \alias{clock24.plot} \arguments{ @@ -15,6 +15,10 @@ \item{hm2dec}{Whether to convert HH:MM clock positions to decimal hours.} \item{label.pos}{Radial positions of the labels.} \item{rp.type}{Whether to plot radial lines, symbols or a polygon.} + \item{loglen}{Whether to log transform the \samp{length} values. Only base + 10 logs are available.} + \item{explab}{Whether to use the default fixed (FALSE) or exponential (TRUE) + notation for the radial labels.} \item{...}{additional arguments are passed to \samp{radial.plot} and then to \samp{plot}.} } diff -Nru r-cran-plotrix-3.8-1/man/gap.boxplot.Rd r-cran-plotrix-3.8-2/man/gap.boxplot.Rd --- r-cran-plotrix-3.8-1/man/gap.boxplot.Rd 2019-10-03 06:09:50.000000000 +0000 +++ r-cran-plotrix-3.8-2/man/gap.boxplot.Rd 2021-09-04 00:19:57.000000000 +0000 @@ -9,7 +9,7 @@ range=1.5,width=NULL,varwidth=FALSE,notch=FALSE,outline=TRUE, names,xlim=NA,ylim=NA,plot=TRUE,border=par("fg"),col=NULL,log="", axis.labels=NULL,axes=TRUE,pars=list(boxwex=0.8,staplewex=0.5,outwex=0.5), - horizontal=FALSE,add=FALSE,at=NULL,main=NULL) + horizontal=FALSE,add=FALSE,at=NULL,main=NULL,xlab="",ylab="") } \arguments{ \item{x}{numeric vector or a list of vectors} @@ -39,10 +39,11 @@ \item{pars}{optional parameters for consistency with \samp{boxplot}} \item{horizontal}{whether to plot horizontal boxplots - currently does nothing} - \item{add}{whether to add the boxplot(s) to a current plot - currently + \item{add}{whether to add the boxplot(s) to an existing plot - currently does nothing.} \item{at}{optional horizontal locations for the boxplots.} \item{main}{a title for the plot.} + \item{xlab,ylab}{X and Y axis labels.} } \value{ A list with the same structure as returned by \samp{boxplot}, except that diff -Nru r-cran-plotrix-3.8-1/man/multivari.Rd r-cran-plotrix-3.8-2/man/multivari.Rd --- r-cran-plotrix-3.8-1/man/multivari.Rd 2021-01-20 21:29:06.000000000 +0000 +++ r-cran-plotrix-3.8-2/man/multivari.Rd 2021-09-08 10:14:13.000000000 +0000 @@ -110,7 +110,7 @@ } \references{ -Scibilia, Bruno (2013). Using Multi-Vari Charts to Analyze Families of Variations. \url{https://blog.minitab.com/blog/using-variability-charts-to-analyze-call-center-wait-times}. +Scibilia, Bruno (2013). Using Multi-Vari Charts to Analyze Families of Variations. \url{https://blog.minitab.com/en/using-variability-charts-to-analyze-call-center-wait-times}. } \author{ diff -Nru r-cran-plotrix-3.8-1/man/plotrix-package.Rd r-cran-plotrix-3.8-2/man/plotrix-package.Rd --- r-cran-plotrix-3.8-1/man/plotrix-package.Rd 2021-01-20 22:45:07.000000000 +0000 +++ r-cran-plotrix-3.8-2/man/plotrix-package.Rd 2021-09-08 09:45:29.000000000 +0000 @@ -13,10 +13,10 @@ \tabular{ll}{ Package: \tab plotrix\cr Version: \tab 3.8-1\cr -Date: \tab 2021-01-21\cr +Date: \tab 2021-09-08\cr License: \tab GPL (>=2)\cr -Packaged: \tab 2021-01-21 01:45:00 UTC; root\cr -Built: \tab R 4.0.3; ; 2020-01-21 01:45:00 UTC; linux\cr +Packaged: \tab 2021-09-08 03:45:00 UTC; root\cr +Built: \tab R 4.0.3; ; 2021-09-08 03:45:00 UTC; linux\cr } The plotrix package is intended to provide a method for getting many sorts of specialized plots quickly, yet allow easy customization of those plots diff -Nru r-cran-plotrix-3.8-1/man/polar.plot.Rd r-cran-plotrix-3.8-2/man/polar.plot.Rd --- r-cran-plotrix-3.8-1/man/polar.plot.Rd 2019-10-03 06:09:50.000000000 +0000 +++ r-cran-plotrix-3.8-2/man/polar.plot.Rd 2021-08-22 07:28:26.000000000 +0000 @@ -2,7 +2,7 @@ \title{Plot values on a circular grid of 0 to 360 degrees} \usage{ polar.plot(lengths,polar.pos=NULL,labels,label.pos=NULL, - start=0,clockwise=FALSE,rp.type="r",...) + start=0,clockwise=FALSE,rp.type="r",loglen=FALSE,explab=FALSE,...) } \alias{polar.plot} \arguments{ @@ -17,6 +17,10 @@ \item{clockwise}{Whether to increase angles clockwise rather than the default counterclockwise.} \item{rp.type}{Whether to plot radial lines, symbols or a polygon.} + \item{loglen}{Whether to log transform the \samp{length} values. Only base + 10 logs are available.} + \item{explab}{Whether to use the default fixed (FALSE) or exponential (TRUE) + notation for the radial labels.} \item{...}{additional arguments passed to \samp{radial.plot} and then to \samp{plot}.} } diff -Nru r-cran-plotrix-3.8-1/man/radial.plot.Rd r-cran-plotrix-3.8-2/man/radial.plot.Rd --- r-cran-plotrix-3.8-1/man/radial.plot.Rd 2020-04-15 05:45:18.000000000 +0000 +++ r-cran-plotrix-3.8-2/man/radial.plot.Rd 2021-09-04 01:00:50.000000000 +0000 @@ -14,7 +14,8 @@ show.grid=TRUE,show.grid.labels=4,show.radial.grid=TRUE,rad.col="gray", grid.col="gray",grid.bg="transparent",grid.left=FALSE,grid.unit=NULL, point.symbols=1,point.col=par("fg"),show.centroid=FALSE,radial.lim=NULL, - radial.labels=NULL,boxed.radial=TRUE,poly.col=NA,add=FALSE,...) + radial.labels=NULL,boxed.radial=TRUE,poly.col=NA,add=FALSE, + loglen=FALSE,explab=FALSE,...) } \arguments{ \item{lengths}{A numeric data vector or matrix. If \samp{lengths} @@ -61,10 +62,16 @@ \samp{pretty(range(lengths))}, but if more than two values are passed, the exact values will be displayed.} \item{radial.labels}{Optional labels for the radial grid. The default is - the values of radial.lim.} + the values of radial.lim, or if loglen is TRUE, the corresponding log + values.} \item{boxed.radial}{Whether to use boxed.labels or text for radial labels.} \item{poly.col}{Fill color if polygons are drawn. Use NA for no fill.} \item{add}{Whether to add one or more series to an existing plot.} + \item{loglen}{Whether to log transform the \samp{length} values. Only base + 10 logs are available. Keep in mind that the values actually plotted will be + the logarithms, although the exponentiated logs are displayed.} + \item{explab}{Whether to use the default fixed (FALSE) or exponential (TRUE) + notation for the radial labels.} \item{...}{Additional arguments are passed to \samp{plot}.} } \value{ @@ -75,7 +82,8 @@ \samp{radial.plot} displays a plot of radial lines, polygon(s), symbols, text or a combination of these centered at the midpoint of the plot frame, the lengths, vertices or positions corresponding - to the numeric magnitudes of the data values. If \samp{show.centroid} + to the numeric magnitudes of the data values. Note that if log transformation is requested with \samp{loglen}, the values plotted will be the logs, not the values displayed on the plot. + If \samp{show.centroid} is TRUE, an enlarged point at the centroid of values is displayed. The centroid is calculated as the average of x and y values unless \samp{rp.type="p"}. In this case, the barycenter of the polygon is @@ -118,17 +126,32 @@ \samp{radial.plot} actually does the plotting, another function is usually called for specific types of cyclic data. } -\author{Jim Lemon - thanks to Jeremy Claisse and Antonio Hernandez Matias - for the \samp{lty} and \samp{rp.type} suggestions respectively, Patrick - Baker for the request that led to \samp{radlab}, Thomas Steiner for - the request for the \samp{radial.lim} and \samp{radial.labels} modifications, - Evan Daugharty for requesting the \samp{add} argument, James MacCarthy - for requesting better radial labels, Steve Ellison for noticing that - the return values of the functions had changed, Don Dennerline for - requesting the rank clock, Mehdi Nellen for the different colors for - the radial and circumferential lines for the grid, Mayeul Kauffmann for - noticing the radial label bug when a separate radial.grid was included - and Ogbos Okike for requesting a text option for rp.type.} +\author{Jim Lemon} +\note{Thanks to + Jeremy Claisse and Antonio Hernandez Matias for the + \samp{lty} and \samp{rp.type} suggestions respectively + + Patrick Baker for the request that led to \samp{radlab} + + Thomas Steiner for the request for the \samp{radial.lim} and \samp{radial.labels} modifications + + Evan Daugharty for requesting the \samp{add} argument + + James MacCarthy for requesting better radial labels + + Steve Ellison for noticing that the return values of the functions had changed + + Don Dennerline for requesting the rank clock + + Mehdi Nellen for the different colors for the radial and circumferential lines for the grid + + Mayeul Kauffmann for noticing the radial label bug when a separate radial.grid was included + + Ogbos Okike for requesting a text option for rp.type + + Keziah Conroy for requesting the log option + +} \seealso{\link{polar.plot},\link{clock24.plot}} \examples{ testlen<-runif(10,0,10) @@ -139,11 +162,12 @@ testlen<-c(sin(seq(0,1.98*pi,length=100))+2+rnorm(100)/10) testpos<-seq(0,1.98*pi,length=100) radial.plot(testlen,testpos,rp.type="p",main="Test Polygon",line.col="blue", - labels=LETTERS[1:8]) + labels=LETTERS[1:8],label.pos=seq(0,14*pi/8,length.out=8)) # now do a 12 o'clock start with clockwise positive radial.plot(testlen,testpos,start=pi/2,clockwise=TRUE,show.grid.labels=2, rp.type="s",main="Test Symbols (clockwise)",radial.lim=c(0,3.5), - point.symbols=16,point.col="green",show.centroid=TRUE,labels=LETTERS[1:6]) + point.symbols=16,point.col="green",show.centroid=TRUE, + labels=LETTERS[1:6],label.pos=seq(0,10*pi/6,length.out=6)) # one without the circular grid and multiple polygons # see the "diamondplot" function for variation on this posmat<-matrix(sample(2:9,30,TRUE),nrow=3) diff -Nru r-cran-plotrix-3.8-1/MD5 r-cran-plotrix-3.8-2/MD5 --- r-cran-plotrix-3.8-1/MD5 2021-01-21 05:50:05.000000000 +0000 +++ r-cran-plotrix-3.8-2/MD5 2021-09-08 11:00:02.000000000 +0000 @@ -1,6 +1,6 @@ -e4c1ec8431bb6982143af3e0b16c256e *DESCRIPTION +5e7492402b9803b372890e5f74e8fbb6 *DESCRIPTION 51cdae9066a4386857ec0a8d0af63b4d *NAMESPACE -00701ebbf2f908e421e5831fd33e5871 *NEWS +58303b8d4d5bee0d9108b27f43b0619e *NEWS 2c74abe5f355af8948fa9087f56959c9 *R/ablineclip.R 163140184d1f3e7c2ac7d6131086cea4 *R/add.ps.R 76f5fc2c4426b0e082293a71976151e0 *R/addtable2plot.R @@ -50,7 +50,7 @@ 9d2cc070d1d3eb1c477e3374a42a036c *R/fullaxis.R abf8099f5da1836abdb01b0a0482eb98 *R/gantt.R f9ddfafff1203a7e636d423fba679e1e *R/gap.barplot.R -ba8176da651ae88bf258dfdaeef98b34 *R/gap.boxplot.R +1fe9ded529bc9bc96d2c31c21cdc3cb7 *R/gap.boxplot.R 095568ff5335532c40644171ef6460e7 *R/gap.plot.R a67d2f8d5405476e342b2f5a6bb3e681 *R/gap_barp.R f2c451d076cbcf808802e54b1b39f1e9 *R/get.tablepos.R @@ -83,9 +83,9 @@ 960aae874cd12958dd6dccde3558879d *R/plot_bg.R f10e1defb3c27cbd4459f322752389f0 *R/polygon.shadow.R 0656a3a9339178d28c7c8f14208d1094 *R/pyramid.plot.R -d0c2fb5b74a8bda5499df0da27992016 *R/radial.grid.R +a9ca72cae93ae7857215c3c9345424a5 *R/radial.grid.R 4a39b9cf3f827790062a28bba3dcfda4 *R/radial.pie.R -c80e4a83c9495e824a0fa4b310002944 *R/radial.plot.R +7da2b2490a8e43021f87ee106b6a369c *R/radial.plot.R d192a9ecba891ee23933ef1083eb5658 *R/radial.plot.labels.R f3ec3c43b07cc3f536c00da149714272 *R/radialtext.R 53ff928d38ff1c68cf2fbdf09c26f1fb *R/raw.means.plot.R @@ -96,7 +96,7 @@ e761953480126b28a14326faa3cb680c *R/ruginv.R 94f6212eb3c3dda4532094d0547cee9f *R/size_n_color.R ff774605f2db5e411bcef2424909bc79 *R/sizeplot.R -f59fd0f29e21ccbb91a120cbc7b9bcf1 *R/sizetree.R +7b85dbba61fe145be9b3e412b403444c *R/sizetree.R de129c7ed4e840767bbc911fb5256708 *R/smoothColors.R 4aa496843da6c03ce4273d8b3b6ae9d6 *R/soil.texture.R 16ff8805beef2f4885d4c93c5bd7ff63 *R/soil.texture.uk.R @@ -125,7 +125,7 @@ 52d0de3c89b6d90fe1e9157b0c76f291 *R/zoomInPlot.R 6c5b0047d50b0d071c9a8162c81ccb31 *data/death_reg.rda db7ccec9c3f56f957ae404ac7eb806ab *data/l2010.rda -a24f03f5ec39591684af7b6d0c4d1fb9 *data/soils.rda +28da395b56d0844c2810292c955c8390 *data/soils.rda 271f59ed8376069aee632b80ba619089 *demo/00Index 7d5c62634e9c734037c6e1381b3c246e *demo/plotrix.R b35ca73e819dbad59881960986301ef3 *inst/CITATION @@ -151,7 +151,7 @@ fdd959e735ce69d626bc683c7142a487 *man/categoryReshape.Rd e57177261b61c4ef3b8caf59dbda3091 *man/centipede.plot.Rd d6019ca90bd3aaaff4e63d9b55aff24c *man/clean.args.Rd -afe83efcd75bdaab3d3e61ff1d8a3aac *man/clock24.plot.Rd +2901a3ae51935abd7510121796844dc1 *man/clock24.plot.Rd dc4c200cb331f0490d5ce7ee0975534d *man/clplot.Rd d8ebaeda4ed4a0af0ee365fc75ddd28a *man/cluster.overplot.Rd a44a53d6840ae4f18cec592a2c8755d7 *man/clustered.dotplots.Rd @@ -190,7 +190,7 @@ ef0018a2314c3b5bf4d0e953ae036aed *man/fullaxis.Rd 0f87c03e28f4f3528dd031077897cf98 *man/gantt.chart.Rd 4ac19f9bcfde71dd07c1326d6750b1ed *man/gap.barplot.Rd -0fe07939aca17dfbac6226843ed189d1 *man/gap.boxplot.Rd +a1ed7586441ee61bd6d9ecf9ffd670d6 *man/gap.boxplot.Rd 32e58044c651a2949554e2ca6a8a8e5f *man/gap.plot.Rd 21c964d611b993d74a9b7aa5142d9af0 *man/gap_barp.Rd 2bfcd82c9e1bc208fade58833094861e *man/get.breaks.Rd @@ -221,7 +221,7 @@ 4bf0a63a5ee0f446c2dd210ebd97b726 *man/maxEmptyRect.Rd 4bb726d76edd975db9258cd700783dcc *man/mtext3d.Rd c149bcc2fe8d19017a0502b8ef9fe0c4 *man/multhist.Rd -54ed47c6904604531adb468417bf9474 *man/multivari.Rd +b973f5822d921c57634d641ecd5c3f26 *man/multivari.Rd a6b1e2596340a535c74848aeffe98833 *man/multsymbolbox.Rd 41c1c83e66a33d35bb0f48d9dfd68909 *man/oz.windrose.Rd 00585c01256159f892de1181dd9f63f3 *man/oz.windrose.legend.Rd @@ -237,8 +237,8 @@ 94da9e98fdf1f64739b188fea1f021f6 *man/plotCI.Rd d537e859f11754e2ab779d75c82a0086 *man/plotH.Rd d0be8d8872d21c55c387ed117d60bc92 *man/plot_bg.Rd -fbec70c9e247537b35e098e73bc088df *man/plotrix-package.Rd -31556e9a35a48fbccdff23395a8cdb07 *man/polar.plot.Rd +0d66618b9edc5d3b02b7037a634bf0cc *man/plotrix-package.Rd +f99459c22b2d5267043f04a863105042 *man/polar.plot.Rd aacd4acbdc1275ecff45c6d962ae8f16 *man/polygon.shadow.Rd 8d1dc46509d56126301ed969bff3ed8c *man/print.brklist.Rd 3624e09ffd23b05f6681cc1c31734345 *man/propbrk.Rd @@ -247,7 +247,7 @@ dddf2ba43c782b71e5a155e6a4b2abe5 *man/pyramid.plot.Rd d0f65eab9235a7dc9694916771a796fd *man/radial.grid.Rd e1ecf218a7dd9d4b5bec2a491a079982 *man/radial.pie.Rd -5c5ff3b993ae5bd2c204ddd130fef571 *man/radial.plot.Rd +74aeeb71451d6b5d53df4f4959d576e2 *man/radial.plot.Rd 390d79e90c403eb71c00be6f2d84047c *man/radial.plot.labels.Rd 9e52803106c4336f54b18549a02a99d2 *man/radialtext.Rd d442e353076ad725947c6e2e6057fa98 *man/raw.means.plot.Rd diff -Nru r-cran-plotrix-3.8-1/NEWS r-cran-plotrix-3.8-2/NEWS --- r-cran-plotrix-3.8-1/NEWS 2021-01-20 22:42:31.000000000 +0000 +++ r-cran-plotrix-3.8-2/NEWS 2021-09-04 00:28:17.000000000 +0000 @@ -1,3 +1,9 @@ +version 3.8-2 + + fixed showcount option in sizetree + log10 plotting added to radial.plot family (thanks to Keziah Conroy) + added X and Y axis labels in gap.boxplot + version 3.8-1 dropped makeDendrite, plotDendrite and sumDendrite functions diff -Nru r-cran-plotrix-3.8-1/R/gap.boxplot.R r-cran-plotrix-3.8-2/R/gap.boxplot.R --- r-cran-plotrix-3.8-1/R/gap.boxplot.R 2019-10-03 06:09:50.000000000 +0000 +++ r-cran-plotrix-3.8-2/R/gap.boxplot.R 2021-09-03 22:55:55.000000000 +0000 @@ -3,7 +3,7 @@ outline = TRUE, names, xlim = NA, ylim = NA, plot = TRUE, border = par("fg"), col = NULL, log = "", axis.labels = NULL, axes = TRUE, pars = list(boxwex = 0.8, staplewex = 0.5, outwex = 0.5), - horizontal = FALSE, add = FALSE, at = NULL, main = NULL) + horizontal = FALSE, add = FALSE, at = NULL, main = NULL,xlab="",ylab="") { if (!is.na(gap$top[1])) if (gap$top[1] > gap$top[2]) @@ -58,7 +58,7 @@ } bxgap$group <- at plot(0, xlim = xlim, ylim = ylim, type = "n", axes = FALSE, - xlab = "", ylab = "", main = main) + main = main,xlab=xlab, ylab=ylab) plotlim <- par("usr") box() if (axes) diff -Nru r-cran-plotrix-3.8-1/R/radial.grid.R r-cran-plotrix-3.8-2/R/radial.grid.R --- r-cran-plotrix-3.8-1/R/radial.grid.R 2019-12-27 10:36:00.000000000 +0000 +++ r-cran-plotrix-3.8-2/R/radial.grid.R 2021-08-14 03:27:44.000000000 +0000 @@ -1,6 +1,6 @@ radial.grid<-function(labels=NA,label.pos=NULL,radlab=FALSE,radial.lim=NULL, - start=0,clockwise=FALSE,label.prop=1.1,grid.pos=seq(0.25,1,0.25),rad.col="gray", - grid.col="gray",grid.bg="transparent",show.radial.grid=TRUE, + start=0,clockwise=FALSE,label.prop=1.1,grid.pos=seq(0.25,1,0.25), + rad.col="gray",grid.col="gray",grid.bg="transparent",show.radial.grid=TRUE, start.plot=FALSE) { if(start.plot) { diff -Nru r-cran-plotrix-3.8-1/R/radial.plot.R r-cran-plotrix-3.8-2/R/radial.plot.R --- r-cran-plotrix-3.8-1/R/radial.plot.R 2020-04-15 21:44:29.000000000 +0000 +++ r-cran-plotrix-3.8-2/R/radial.plot.R 2021-09-04 01:06:58.000000000 +0000 @@ -4,7 +4,7 @@ # example: clock24.plot(rnorm(16)+3,seq(5.5,20.5,length.out=16)) clock24.plot<-function(lengths,clock.pos,labels=0:23,minutes=FALSE, - hm2dec=FALSE,label.pos=NULL,rp.type="r",...) { + hm2dec=FALSE,label.pos=NULL,rp.type="r",loglen=FALSE,explab=FALSE,...) { npos<-length(lengths) # if no positions are given, spread the lines out over the circle @@ -21,7 +21,7 @@ if(minutes) labels<-paste(labels,"00",sep=":") if(is.null(label.pos)) label.pos<-seq(0,pi*1.917,length.out=24) invisible(radial.plot(lengths,radial.pos,labels=labels,label.pos=label.pos, - rp.type=rp.type,start=pi/2,clockwise=TRUE,...)) + rp.type=rp.type,start=pi/2,clockwise=TRUE,loglen=loglen,explab=explab,...)) } # plots data as radial lines or a polygon starting at the right and going @@ -30,19 +30,21 @@ # example: polar.plot(rnorm(20)+3,seq(90,280,by=10)) polar.plot<-function(lengths,polar.pos=NULL,labels,label.pos=NULL, - start=0,clockwise=FALSE,rp.type="r",...) { + start=0,clockwise=FALSE,rp.type="r",loglen=FALSE,explab=FALSE,...) { - npos<-length(lengths) - # if no positions are given, add the average distance between positions so that - # the first and last line don't overlap - if(is.null(polar.pos)) radial.pos<-seq(0,(2-2/(npos+1))*pi,length=npos) + npoints<-length(lengths) + if(is.null(polar.pos)) { + halfinc<-pi/npoints # evenly spaced, offset from zero + radial.pos<-seq(halfinc,2*pi-halfinc,length.out=npoints) + } else radial.pos<-pi*polar.pos/180 if(start) start<-pi*start/180 - if(is.null(label.pos)) label.pos<-seq(0,1.89*pi,length=18) - else label.pos<-pi*label.pos/180 - if(missing(labels)) labels<-as.character(seq(0,340,by=20)) + if(missing(labels)) { + labels<-label.pos<-seq(0,340,by=20) + label.pos<-pi*label.pos/180 + } invisible(radial.plot(lengths,radial.pos,labels,label.pos,start=start, - clockwise=clockwise,rp.type=rp.type,...)) + clockwise=clockwise,rp.type=rp.type,loglen=loglen,explab=explab,...)) } # plots radial lines of length 'lengths', symbols at 'lengths' from the @@ -59,9 +61,12 @@ rad.col="gray",grid.col="gray",grid.bg="transparent",grid.left=FALSE, grid.unit=NULL,point.symbols=1,point.col=par("fg"),show.centroid=FALSE, radial.lim=NULL,radial.labels=NULL,boxed.radial=TRUE,poly.col=NA, - add=FALSE,...) { + add=FALSE,loglen=FALSE,explab=FALSE,...) { - if(is.null(radial.lim)) radial.lim<-range(lengths) + # first convert lengths to log values if desired + if(loglen) lengths<-do.call(log10,list(lengths)) + if(is.null(radial.lim)) radial.lim<-c(floor(min(lengths,na.rm=TRUE)), + ceiling(max(lengths,na.rm=TRUE))) length.dim<-dim(lengths) if(is.null(length.dim)) { npoints<-length(lengths) @@ -75,8 +80,11 @@ } lengths<-lengths-radial.lim[1] lengths[lengths<0]<-NA - if(is.null(radial.pos)) - radial.pos<-seq(0,pi*(2 - 2 * (rp.type != "l")/npoints),length.out=npoints) + if(is.null(radial.pos)) { + halfinc<-pi/npoints # evenly spaced, offset from zero + radial.pos<-seq(halfinc,2*pi-halfinc,length.out=npoints) + } + if(is.null(label.pos)) label.pos=radial.pos radial.pos.dim<-dim(radial.pos) if(is.null(radial.pos.dim)) radial.pos<-matrix(rep(radial.pos,nsets),nrow=nsets,byrow=TRUE) @@ -85,13 +93,32 @@ if(clockwise) radial.pos<--radial.pos if(start) radial.pos<-radial.pos+start if(show.grid) { - if(length(radial.lim) < 3) grid.pos<-pretty(radial.lim) - else grid.pos<-radial.lim - if(grid.pos[1] < radial.lim[1]) grid.pos<-grid.pos[-1] + if(loglen == 0) { + if(length(radial.lim) < 3) grid.pos<-pretty(radial.lim) + else grid.pos<-radial.lim + } else { + # log scaling is ON + rangerl<-ceiling(radial.lim) + grid.pos<-rangerl[1]:rangerl[2] + oddnum<-length(grid.pos) %% 2 + if(oddnum) dropit<-2 + while(length(grid.pos) > 6) { + if(oddnum) { + grid.pos<-grid.pos[-dropit] + dropit<-dropit+1 + } else { + grid.pos<-grid.pos[seq(1,length(grid.pos),by=2)] + } + } + if(is.null(radial.labels)) { + if(explab) radial.labels<-paste0(10,"^",grid.pos) + else radial.labels<-10^grid.pos + } + if(grid.pos[1] < radial.lim[1]) grid.pos[1]<-radial.lim[1] + angles<-seq(0,1.96*pi,by=0.04*pi) + } maxlength<-max(grid.pos-radial.lim[1]) - angles<-seq(0,1.96*pi,by=0.04*pi) - } - else { + } else { grid.pos<-NA maxlength<-diff(radial.lim) } @@ -100,14 +127,6 @@ par(mar=mar,pty="s") plot(c(-maxlength,maxlength),c(-maxlength,maxlength),type="n",axes=FALSE, main=main,xlab=xlab,ylab=ylab) - if(is.null(label.pos)) { - if(is.null(labels)) nlpos<-ifelse(npoints > 8,8,npoints) - else { - if(is.na(labels[1])) nlpos<-ifelse(npoints > 8,8,npoints) - else nlpos<-length(labels) - } - label.pos<-seq(0,pi*(2-2/nlpos),length.out=nlpos) - } if(show.grid) { radial.grid(labels=labels,label.pos=label.pos,radlab=radlab, radial.lim=radial.lim,start=start,clockwise=clockwise, @@ -160,7 +179,7 @@ polygon(xpos,ypos,border=linecol,col=polycol,lty=ltype, lwd=lwidth,...) if(match("s",rptype,0)) - points(xpos,ypos,pch=pointsymbols,col=pointcol,...) + points(xpos,ypos,pch=point.symbols,col=pointcol,...) if(match("t",rptype,0)) { if(boxed.radial) boxed.labels(xpos,ypos,point.symbols,col=pointcol) diff -Nru r-cran-plotrix-3.8-1/R/sizetree.R r-cran-plotrix-3.8-2/R/sizetree.R --- r-cran-plotrix-3.8-1/R/sizetree.R 2019-10-03 06:09:50.000000000 +0000 +++ r-cran-plotrix-3.8-2/R/sizetree.R 2021-07-30 05:15:09.000000000 +0000 @@ -61,8 +61,8 @@ newcol[[1]] <- NULL nextx <- subset(x, x[, 1] == xvalue, 2:dimx[2]) sizetree(nextx, right, top, right + 1, - lastcenter = top - xfreq[bar]/2, showval = showval, - stacklabels = stacklabels, firstcall = FALSE, + lastcenter = top - xfreq[bar]/2, showval = showval, + showcount = showcount, stacklabels = stacklabels, firstcall = FALSE, col = newcol, border = border, base.cex = base.cex) } }