[BioC] lcex option not working?
Martin Maechler
maechler at stat.math.ethz.ch
Fri Dec 19 21:38:36 MET 2003
>>>>> "Obi" == Obi Griffith <obig at bcgsc.ca>
>>>>> on Thu, 18 Dec 2003 14:46:24 -0800 writes:
Obi> Hi there, I'm using the hexbin function to make some
Obi> really snazzy density plots for extremely large
Obi> datasets. I'm having some trouble getting the legend
Obi> to look right. The lcex specified in the documentation
Obi> for altering the legend text size does not seem to have
Obi> any effect. No matter what lcex value I supply, the
Obi> output looks the same. The normal cex values work
Obi> fine. Is this a bug or am I missing something? The
Obi> following program produces a beautiful plot with a very
Obi> difficult to read legend.
We cannot reproduce your code, since we don't have your data.
The following however is reproducible and shows that you are right:
xy <- MASS::mvrnorm(100000, mu = 1:2, Sigma = cbind(c(10,1),c(1,4)))
library("hexbin")
hbin <- hexbin(xy[,1], xy[,2], xbins=100)
plot(hbin)# nice using gray scale
plot(hbin, style = "nested.centroids")# legend not so nice
## try to improve legend; but it doesn't
plot(hbin, main="x vs y", style = "nested.centroids",
legend = 1, lcex = 2.5, ## <<<<
cex.main = 2.5, cex.lab=2.5, cex.sub=2.5, cex.axis=2.5)
---
You are correct. It's the hex.legend() function that 'lcex'
(and more) is passed to, and unfortunately, that needs quite a
bit of adaption before it could obey 'lcex' in the case of
style = "nested.lattice" or "nested.centroids" --- because the
hexagon symbols and the white space would also have to be enlarged.
I've just committed slightly improved code to hexbin's
development version; anyone interested in sitting down and
improve the code, please drop us (Nicco & me) a line!
Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
More information about the Bioconductor
mailing list