search for: logticks

Displaying 7 results from an estimated 7 matches for "logticks".

2009 Jun 18
1
lattice logaritmic scale (basis "e" ), rewriting labels using xscale.component
...t this working somehow or do I have to take a different approach? Thanks, Katharina Here my failing approach: require(lattice) data(Earthquake, package = "MEMSS") xscale.components.log <- function(lim, ...) { ans <- xscale.components.default(lim = lim, ...) tick.at <- logTicks(paste("e^",lim,sep=""), loc = c(1, 3)) ans$bottom$ticks$at <- log(tick.at, 2) ans$bottom$labels$at <- log(tick.at, 2) ans$bottom$labels$labels <- as.character(tick.at) ans } logTicks <- function (lim, loc = c(1, 5)) { ii <- floor(log(range(lim...
2011 Aug 15
1
lattice: How to get log base for each axis inside panel function?
Hello! I'd like to have a function to draw correct grid while using log axis with xyplot from lattice package. Right now I have the following code inside of my panel function: lim <- current.panel.limits() v <- latticeExtra:::logTicks(2^lim$xlim, loc=1) h <- latticeExtra:::logTicks(2^lim$ylim, loc=1) panel.abline(h=log2(h), v=log2(v), col="LightGray") Is there an easy way to get log base used for particular axis to transform data so I can write general purpose panel.grid.log? Mikhail
2007 Apr 07
2
Setting where the x-axis crosses the y-axis
Hi all, my apologies for a probably very obvious question but i can't figure out if, on a bar plot, there is a simple way to have the x-axis cross the y-axis at 1, when the y-axis is on a log-scale? I want to draw a bar plot, and have some of the bars "drop" below 1 while starting from 1. Is this possible? I have been trying various things using barplot, barplot2 etc... without
2008 Jul 21
0
xyplot: distance between axis and axis-label gets wrong
...lattice estimates the space wich gets used by the labels before it calls the yscale.components function. However, this function can change what is supposed to be plotted and therefore the width can change making previous calculations void. Here is an example: ## ## functions for nice log-axis ## logTicks <- function (lim, loc = c(1, 5), base=10) { ii <-floor(log(range(lim), base)) + c(-1, 2) main <- base^(ii[1]:ii[2]) r <- as.numeric(outer(loc, main, "*")) r[lim[1] <= r & r <= lim[2]] } xyscale.components.log <- function(lim, ..., side=c("bottom&quot...
2007 Jul 07
2
Several quick questions
Dear R users, Here is a couple a quick questions, for which I was unable to not find any answer in the list archives and in the help: 1- Is there any R equivalents of the VB functions Cint, CStr, etc... (for non VB users, these functions transform the category of a specified variable and smartly adapt the value of this variable) ? I have tried to use the as.numeric, as.factor and as.vector
2004 Jan 06
1
help on rmeta
Hello I'm trying to plot hazard risk values using the function metaplot with the specifications: > metaplot(HR,SE,W,labels=row.names(lc),xlab="Hazard Ratio",ylab="Covariates", logeffect=TRUE,logticks=FALSE,colors=meta.colors(box="black",lines="dark gray",zero="darkgray"),cex=1.5,cex.lab=1.5,font=3) However, in the plot the x axis starts after my minimum point; precisely, the x axis ticks start at 2 even if my minimum hazard is 0.44 (i.e. exp(-0.8)); I've also...
2011 Sep 15
1
Lattice xyplot log scale labels help!
I have a problem with lattice log scales that I could use some help with. I'm trying to print log y-axis scales without exponents in the labels. A similar thread with Deepayan' recommendation is here: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/9865.html. For example, this code using xyplot produces a logged y-axis but the labels (e.g. "10^1.2") are not very