lcex option not working?
1
0
Entering edit mode
Obi Griffith ▴ 50
@obi-griffith-577
Last seen 10.3 years ago
Hi there, I'm using the hexbin function to make some really snazzy density plots for extremely large datasets. I'm having some trouble getting the legend to look right. The lcex specified in the documentation for altering the legend text size does not seem to have any effect. No matter what lcex value I supply, the output looks the same. The normal cex values work fine. Is this a bug or am I missing something? The following program produces a beautiful plot with a very difficult to read legend. library("hexbin") data1 <- scan("data.txt",list(x=0,y=1)) x0 <- data1$x x1 <- data1$y hbin <- hexbin(x, y, xbins=100) plot.hexbin(hbin, xlab="stuff",ylab="other stuff", xlim=range(-1,1), ylim=range(-1,1), main="stuff vs other stuff", style = "nested.centroids", legend = 1, *lcex = 2.5*, cex.main = 2.5, cex.lab=2.5, cex.sub=2.5, cex.axis=2.5, minarea = 0.05, maxarea = 0.8, trans = NULL, inv = NULL, border = FALSE, density = -1, colramp = function(n){ LinGray(n,beg = 90,end = 15) }, verbose = getOption("verbose")) Cheers, Obi
hexbin hexbin • 1.3k views
ADD COMMENT
0
Entering edit mode
@martin-maechler-2
Last seen 5.4 years ago
Switzerland
>>>>> "Obi" == Obi Griffith <obig@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@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 <><
ADD COMMENT

Login before adding your answer.

Traffic: 610 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6