Displaying 20 results from an estimated 76 matches for "axtick".
Did you mean:
axticks
2004 Feb 19
1
Possible error in ?axTicks
Hi all,
Before posting to r-bugs, I thought that I would just verify this one
first.
It looks like the help for axTicks() needs to be corrected.
It presently says:
'axTicks()' can be regarded as an R implementation of the C function
'CreateAtVector()' in '..../src/main/graphics.c' which is called by
'axis(side,*)' when no argument 'at' is specified.
However, CreateAtVect...
2011 Feb 04
1
axTicks.Rd documentation bug
?axTicks says:
usr: numeric vector of length four, defaulting to ?par("usr")?
giving horizontal (?x?) and vertical (?y?) user coordinate
limits.
but this is not how the function is implemented -- in fact 'usr' should
be a vector of length two corresponding to th...
2004 Apr 15
1
pretty for a log-axis
Is there a function that does the same as pretty but on a log-scale?
Suppose you have
x <- exp( runif( 100, 0, 6 ) )
(which will between 1 and 403), then I would like to have a result like:
log.pretty( x )
[1] 1 5 10 50 100 500
Bendix C.
----------------------
Bendix Carstensen
Senior Statistician
Steno Diabetes Center
Niels Steensens Vej 2
DK-2820 Gentofte
Denmark
tel: +45 44 43 87 38
2005 Jun 28
2
axTicks on a reverse ylog plot (PR#7973)
...# Test case A: works as expected
plot(10:100,log="y",ylim=c(100,11))
grid()
par("yaxp")
# Test case B: grid does not have horizontal lines; par("yaxp") is
different
plot(1:100,log="y",ylim=c(100,10))
grid()
par("yaxp")
In the second test case, axTicks for the horizontal lines (in grid())
returns numeric(0) for spacing ... how do the tick marks get drawn in
the first place??
-mt
--please do not edit the information below--
Version:
platform = powerpc-apple-darwin8.1.0
arch = powerpc
os = darwin8.1.0
system = powerpc, darwin8.1.0
status = P...
2005 Aug 18
2
axTicks and window resizing
...les
with x (distance), y (altitude) and a z parameter (altitude magnification).
profplot<-function(x,y,z=10,...){
op <- par()$mai
par(mai=c(0.95625,0.76875,0.76875,0.95625))
plot(x,y*z, type="l",asp=1,las=1,xlab="",ylab="",yaxt="n",...)
axis(2,labels=axTicks(2)/z,las=1)
axis(4,labels=axTicks(2)/z,las=1)
on.exit(par(mai=op))
}
This worked apparently well until I had to resize the graphical window
after plotting. In this case, I get this message:
> profplot(prof$dist,prof$alt,col="blue")
> Erreur : les longueurs de 'at' et...
2012 Aug 22
1
Plot label axis with expression
Hi all,
I need help with axis in plot.
I want to edit y axis label of my plot. My data is like:
x <- c(100,50,10,1,0.1,0.05,0.001)
plot(log(x))
axTicks(2) # Label of y axis
[1] -6 -4 -2 0 2 4
I'd like that y axis label was like: e^-6, e^-4, etc. (with text "e"
superscript -6, -4, etc.) I try to use expression(), but don't work.
plot(log(x), yaxt="n")
axis(2, at=axTicks(2), labels=expression(rep("e",times...
2008 Aug 01
0
standardize ggplot and lattice themes
...k, col.lab = "black",
> xpd = FALSE, mar = old.par$mar + c(-2,-1,-1,3), mgp=c(1.8, 0.5, 0),
> col="black")
>
> plot(x, y1, new=TRUE, t="n") # plots nothing, needed to find the
> dimensions
>
> lims <- par("usr")
> subGrid1 <- axTicks(1) + mean(diff(axTicks(1)))/2 # position of the
> grid sub-divisions
> subGrid2 <- axTicks(2) + mean(diff(axTicks(2)))/2
>
> plot(x, y1, col=1, xlab = "x", ylab = "value", xaxt = "n", yaxt =
> "n", pch=16, cex=0.8,
> panel.first =...
2004 Mar 25
1
How to add a top X-axis with a different logarithmic scale?
Hi,
I am trying to put on one plot two different logarithmic
scales, using the bottom and top X-axes.
Below there is an example of what I am trying to achieve,
using axTicks() -- and fails.
I already spent few hours on that, and cannot figure out from
?par and ?axTicks what I am doing wrong.
Example follows:
############################################################
#### Data
x <- c(1.1*1:4, 25*1:5) / 50e+03
y <- c(0.15*1:4, 0.6 + 0.05*1:5)
#### Con...
2010 Nov 20
2
plotting a timeline
...class = "data.frame", row.names = c(NA, -9L))
plot(the_data$eventtime, the_data$impact, type="h", frame.plot=FALSE, axes =
FALSE, xlab="",ylab="", col="grey")
text(the_data$eventtime,the_data$impact, the_data$label)
#axis(1)
abline(h=0,lwd=2)
text(axTicks(1),-0.1, axTicks(1))
points(axTicks(1),rep(-0.05,length(axTicks(1))), type="h")
[[alternative HTML version deleted]]
2012 Nov 14
2
vectorized plotmath expressions via substitute()
hi all - i've seen versions of this question before, but none seem to get
directly at my solving my (probably very simple) issue:
i simply want to annotate the tick marks on an axis with (superscripted)
10^x notation, and tried this:
axis(1, at = axTicks(1), as.expression(substitute(10^foo, list(foo =
axTicks(1))))
thinking the as.expression/substitute would create the appropriate
expression vector from the expansion of the foo vector.
i'm continually stuck in the error process, however, with axis() where R
complains that i've only provid...
2009 Dec 03
2
Formatting of numbers on y axis
Hello all. I have the following:
plot(salaries$yearID, salaries$salary, type='n', xaxt='n', xlab='',
yaxt='n', ylab='')
axis(1, at=unique(salaries$yearID), labels=unique(salaries$yearID), lwd=.25,
tck=-0.05)
axis(2, axTicks(2), format(axTicks(2), scientific = F))
Which nicely creates the Y axis with the raw numbers, which are in the range
of .5 - 7 million.
However, it displays them as "1000000", and so on- I'd like it to show just
whole numbers 1, 2, 3, through 7, so I can label the Y axis "in m...
2005 Aug 14
1
Labels on axes with log scales with lattice
...and.
xyplot(log10(y) ~ x, scales=list(y=list(at=c(1, 2, 3), labels=c(10,
100, 1000))))
My problem is that I am making multiple plots and cannot set the
labels on each plot individually. I need to automate the computation
of the "at" and "labels" parameters. I think the "axTicks" command
can compute the information I need to set "at" and "labels" correctly,
but I am having trouble determining how to set its parameters to make
it compute the information I need. Perhaps "pretty" might work to,
but "axTicks" seems better designed...
2013 Jan 15
2
Month name in English, not R running language
...the language of R, but
I search rather a way to change it for just the next command (also I run
R in MacOS !).
The solution will be to make myself the axis... except if someone has
the trick to do it more easily.
To generate the axis myself, it is not so simply to get one tick by
month. I try
axTicks(1) but it gives 5 ticks rather than 4
and
> as.Date(axTicks(1), "1970-01-01")
[1] "2000-04-13" "2000-05-03" "2000-05-23" "2000-06-12" "2000-07-02"
Is not what I expected. Plot with date object seems to use a special way
to generate...
2008 Jun 13
1
adding custom axis to image.plot() and strange clipping behavior
...on of 'if' statement
## and set 'xpd = TRUE'
imp <- `body<-`(image.plot,value=`[[<-`(body(image.plot),28,
quote({par(big.par)
par(plt = big.par$plt, xpd = TRUE)
par(mfg = mfg.save, new = FALSE)
invisible()})))
imp(m,axes=FALSE)
box()
axis(1,axTicks(1),lab=letters[1:length(axTicks(1))])
## clip to plotting region for additional
## graphical elements to be added:
par(xpd=FALSE)
abline(v=0.5)
###=== end code
I wonder if anyone has any insights into this behavior? Since in the axis() documentation, it says:
"Note that xpd is not accepted a...
2012 Aug 01
1
add text to a plot, create character labels
Hi,
I was trying to run the following, where the labels on the x axis are dates
and need to be converted to characters. It did not work. Any help would be
appreciated. Thanks.
>
text(axTicks(1),par("usr)[3]-2,srt=45,adj=1,labels=as.character(c("2008-01-08","2008-08-10","2008-08-22","2008-09-03",
"2008-09-15")), xpd=T, cex=0.8)
Error: unexpected numeric constant in
"text(axTicks(1),par("usr)[3]-2,srt=45,adj=1,labels=as.ch...
2006 Feb 16
1
R-help - Problem in drawing braplot with a huge value of data
Hello R-experts,
I am facing a strange problem while creating a barplot. I have serise of
data of which the first
on is around 162589 while the remaining data are around 0-150. so when I am
ploting the barplot
with all the data I am getting a single line -> test1.jpg.
But If I remove the 1st value i.e 162589 then I am getting a normal
barplot -> test2.jpg
Can some one help me regarding
2009 Jan 27
3
plot Ticks
Is there a way to force the number of ticks along an axis ?
I read the on-line documentation and tried many combinations of all available parameters from functions
par(), axTicks(), axis(), plot() ... but no luck !
Thank you very much,
Maura
tutti i telefonini TIM!
[[alternative HTML version deleted]]
2005 Mar 30
1
Finding the "height of a line of text" for axis
...ks <- function(at) {
# Start of the ticks
base<-par("usr")[1]
# Length of the ticks
l<-par("cxy")[2]*par("tcl")
for (i in at) {
lines(c(base,base+l),rep(i,2),col="red")
}
}
# Test plot
plot(c(1,2,3), axes=FALSE)
# Draw ticks in red
drawticks(axTicks(2))
# Overprint with normal axis
axis(2, axTicks(2))
Thanks in advance,
Steven Murdoch.
--
w: http://www.cl.cam.ac.uk/users/sjm217/
2005 Nov 21
1
Plotting one or more series on the same graphs
Hi, I'm from Italy (sorry for my english...). I've two questions about
the plot function.
I've to create a simple graph for the data set "n_species":
species=sqlQuery(dati, "select count(distinct species), season from
captures_complete_r group by species, season")
n_species=tapply(species$count, species$season, sum)
n_species=data.frame(n_species)
n_species
2003 Dec 11
2
returning plot tick marks
Is there an easy way to return the values of the axis tick marks resulting from plot.default? For example, plot(1:1000) would return 0, 200, 400, 600, 800, 1000 from the x axis.
Thanks,
Max
---------------------------------
[[alternative HTML version deleted]]