[R] [FORGED] Re: Question on function "scatterplot3d"

Rolf Turner r.turner at auckland.ac.nz
Thu Jun 1 07:15:40 CEST 2017


On 01/06/17 13:17, Ismail SEZEN wrote:
> 
>> On 1 Jun 2017, at 03:41, li li <hannah.hlx at gmail.com> wrote:
>>
>> Hi all,
>>   I have a question with regard to making plots using function
>> "scatterplot3d".
>> Please see the example below. It looks like, for y axis, the tickmark text
>> was cutoff.
>> The number "10" does not show up completely. I tried to work with par(mpg).
>> It does not
>> seem to work. Hope to get some advice here. Thanks much!
>>    Hanna
>>
>> C <- runif(30)
>> B <- rep(1:3, each=10)
>> A <- rep(1:10,3)
>> scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red",  main =
>> "",
>>               grid=TRUE,  col.grid="lightgreen",
>>               xlab="x", ylab="y", zlab="z”)
> 
> Everything seems ok to me. Try to reset/clear all plots in your plotting window and try only to run the code above. Perhaps You changed par settings before in some point?


I tried the code given above, and after I replaced the <expletive 
deleted> incorrect double quote mark (after the final "z"), it ran and 
looked OK *except* for the positioning of the "y" axis label, which is 
at the "far end" of the y-axis rather than being at the "centre" of the 
y-axis.  (See attached.)

Is this a bug?

cheers,

Rolf Turner

P.S. I have also attached the code in the file "scatScript.txt", for 
convenience.

P^2. S.:

 > sessionInfo()
R Under development (unstable) (2017-04-21 r72585)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so

locale:
  [1] LC_CTYPE=en_NZ.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_NZ.UTF-8        LC_COLLATE=en_NZ.UTF-8
  [5] LC_MONETARY=en_NZ.UTF-8    LC_MESSAGES=en_NZ.UTF-8
  [7] LC_PAPER=en_NZ.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] scatterplot3d_0.3-40 misc_0.0-16

loaded via a namespace (and not attached):
  [1] compiler_3.5.0       deldir_0.1-15        Matrix_1.2-8
  [4] spatstat.utils_1.4-1 tools_3.5.0          mgcv_1.8-17
  [7] abind_1.4-5          spatstat_1.50-0      rpart_4.1-11
[10] nlme_3.1-131         grid_3.5.0           polyclip_1.6-1
[13] lattice_0.20-35      goftest_1.1-1        tensor_1.5

-- 
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scat.pdf
Type: application/pdf
Size: 5476 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170601/9701dd1d/attachment.pdf>
-------------- next part --------------
library(scatterplot3d)
set.seed(42)
C <- runif(30)
B <- rep(1:3, each=10)
A <- rep(1:10,3)
scatterplot3d(B,A,C, type = "h", lwd = 1, pch = 16, color="red",
              main = "", grid=TRUE,  col.grid="lightgreen",
              xlab="x", ylab="y", zlab="z")



More information about the R-help mailing list