Bug 8934 - Irregularity in stem() display
Summary: Irregularity in stem() display
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: Graphics (show other bugs)
Version: old
Hardware: All Linux
: P5 normal
Assignee: Jitterbug compatibility account
URL:
Depends on:
Blocks:
 
Reported: 2006-06-03 07:55 UTC by Jitterbug compatibility account
Modified: 2006-06-03 07:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2006-06-03 07:55:41 UTC
From: François Pinard <pinard@iro.umontreal.ca>
Hi, R people.

Consider the following small R session:

======================================================================>
> a <- c(8.48, 9.58, 9.96)
> stem(a)

  The decimal point is at the |

  8 |
  8 | 5
  9 |
  9 | 6
  10 | 0

> stem(round(a,1))

  The decimal point is at the |

   8 | 5
   9 |
   9 | 6
  10 | 0

======================================================================<

As the output of ?stem is rather vague about the format of its output,
some may question whether we have bugs here, or not.  If not, let's
call what follows mere "suggestions for improvement" :-).

The vertical bars are aligned in the second case while they are not in
the first.  Would not they be nicer if always aligned?

Also, while "scale=" could adjusted to elongate or compress the result,
the scale is meant to be applied over the "default" scale, the meaning
of which is not defined in ?stem.  The default scale seemingly uses more
lines than really required.  Maybe this default could be improved?

Here is another strangety about stem():

======================================================================>
> stem(2)
> stem(c(2, 2))

  The decimal point is at the |

  2 | 00

======================================================================<

That is, a single value is not reported, while it probably should.

--please do not edit the information below--

Version:
 platform = i686-pc-linux-gnu
 arch = i686
 os = linux-gnu
 system = i686, linux-gnu
 status = Under development (unstable)
 major = 2
 minor = 4.0
 year = 2006
 month = 06
 day = 01
 svn rev = 38258
 language = R
 version.string = R version 2.4.0 Under development (unstable) (2006-06-01 r38258)

Locale:
LC_CTYPE=fr_CA.UTF-8;LC_NUMERIC=C;LC_TIME=fr_CA.UTF-8;LC_COLLATE=fr_CA.UTF-8;LC_MONETARY=fr_CA.UTF-8;LC_MESSAGES=fr_CA.UTF-8;LC_PAPER=fr_CA.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_CA.UTF-8;LC_IDENTIFICATION=C

Search Path:
 .GlobalEnv, package:methods, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, Autoloads, package:base

-- 
François Pinard   http://pinard.progiciels-bpi.ca

Comment 1 Jitterbug compatibility account 2006-08-29 03:36:00 UTC
NOTES:
 Alignment problem, also stem() returns no output for an input of length 1
Comment 2 Jitterbug compatibility account 2006-08-29 05:36:32 UTC
Audit (from Jitterbug):
Mon Jun 26 13:32:35 2006	ripley	moved from incoming to Graphics
Tue Aug 29 00:36:32 2006	thomas	changed notes