Bug 14550 - Wishlist: mosaicplot: border and usr
Wishlist: mosaicplot: border and usr
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Wishlist
R 2.12.2
x86_64/x64/amd64 (64-bit) Windows 64-bit
: P5 enhancement
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-07 12:12 UTC by Sina Rüeger
Modified: 2011-04-09 12:24 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 Sina Rüeger 2011-04-07 12:12:39 UTC
Two items concerning the function mosaicplot().

1st) Polygons produced by mosaicplot have a black border. However, removing this black border by setting mosaicplot(..., border = NA) does not work, because "border" is not parameterized. How to add "border" to mosaicplot? Solution: mosaicplot.default() has several lines where polygon() is creating the rectangular areas. polygon() has a argument called „border“. polygon(..., border = NA) produces no border, while polygon(..., border = NULL) produces a black border. From my point of view, mosaicplot() should have an argument border = NA or border = NULL.

2nd) Consider following example:
mosaicplot(color ~ cut, data = diamonds, color = TRUE, cex.axis = 2)
When increasing cex.axis, the letters left and on top are cutted. This happens because it depends on par(usr). My approach: changing opar <- par(usr = c(1, 1000, 1, 1000)) to opar <- par(usr = c(1, 1050, 1, 1050)).

Thanks!
Sina
Comment 1 Brian Ripley 2011-04-08 06:53:08 UTC
This seems to be a Wishlist item: see the FAQ for how to file such.

We don't have 'diamonds' so your example is not reproducible: please supply it.
Comment 2 Brian Ripley 2011-04-08 15:12:01 UTC
Probably fixed in pre-2.14.0, pending an example.
Comment 3 Sina Rüeger 2011-04-09 09:01:36 UTC
Reproducible example for 2nd)
library(ggplot2)
mosaicplot(color ~ cut, data = diamonds, color = TRUE, cex.axis = 2)
Comment 4 Brian Ripley 2011-04-09 12:24:39 UTC
Seems to work well enough.