Displaying 20 results from an estimated 1000 matches similar to: "axTicks and window resizing"
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.
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 the appropriate elements of
par("usr") [1:2 if side is 1 or 3, 3:4 if side is 2 or
2005 Jun 28
2
axTicks on a reverse ylog plot (PR#7973)
There is still issues with the reversed y-log scale plot:
# 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
2023 Jan 31
3
How to calculate the derivatives at each data point?
Hi everyone,
I have a vector with atmospheric measurements (x-axis) that is
obtained/calculated at different altitudes (y-axis). The altitude is
uniformly distributed every 7 meters.
For example my dataframe is:
df <- dataframe(
*altitude* = c(1005, 1012, 1019, 1026, 1033, 1040, 1047, 1054, 1061, 1068),
*atm_values* = c(1.41, 1.40, 1.39, 1.38, 1.37, 1.37, 1.38, 1.36, 1.33, 1.31)
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")
2023 Jan 31
1
[EXT] How to calculate the derivatives at each data point?
Try something like
with(df, predict(smooth.spline(x = altitude, y = atm_values), deriv = 1))
Cheers,
Andrew
--
Andrew Robinson
Chief Executive Officer, CEBRA and Professor of Biosecurity,
School/s of BioSciences and Mathematics & Statistics
University of Melbourne, VIC 3010 Australia
Tel: (+61) 0403 138 955
Email: apro at unimelb.edu.au
Website: https://researchers.ms.unimelb.edu.au/~apro
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 <-
2010 Nov 20
2
plotting a timeline
I was trying to recreate this kind of timeline plot:
http://www.vertex42.com/ExcelArticles/create-a-timeline.html
As you can see in their excel example, the events are nicely placed out on
both sides of the timeline axis.
AFAIK there is no function to do this nicely in R-project. Furthermore,
graphics and lattice packages are unable to draw the x-axis in the middle of
the plot. (datapoints
2023 Jan 31
1
How to calculate the derivatives at each data point?
Hi Konstantinos
Not exactly derivative but
> diff(df[,2])
[1] -0.01 -0.01 -0.01 -0.01 0.00 0.01 -0.02 -0.03 -0.02
May be enaough for you.
Cheers
Petr
>
> -----Original Message-----
> From: R-help <r-help-bounces at r-project.org> On Behalf Of konstantinos
> christodoulou
> Sent: Tuesday, January 31, 2023 10:16 AM
> To: r-help mailing list <r-help at
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
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
2005 Aug 14
1
Labels on axes with log scales with lattice
I using lattice to make some plots and I want to make the y-axis on
some of these plots use a log scale. In the following plot:
x <- 1:10
y <- 2^x
xyplot(log10(y) ~ x)
I get tick marks on the y-axis at 0.5, 1.0, 1.5, 2.0, 2.5, and 3.0. I
would rather have just 3 tick marks at 1.0, 2.0, and 3.0 but labeled
10, 100, and 1000.
I know this can be done using the "at" and
2013 Jan 15
2
Month name in English, not R running language
When ploting a timeseries, the months are shown with abbreviation in the
current language of the system.
For example,
x <- seq(from=as.Date("2000-04-01"), length.out=100, by=1)
y <- rnorm(length(x), 5,2)
plot(x, y)
Show for me "avi mai jui jul" as I use R with French language localization.
I see in the Windows FAQ how to completely change the language of R, but
I
2008 Jun 13
1
adding custom axis to image.plot() and strange clipping behavior
Hi list,
I wanted to plot an image with a colorbar to the right of the plot, but set my own axis labels (text rather than numbers) to the image. I have previously accomplished this with two calls to image(), but the package 'fields' has a wrapper function, image.plot(), which does this task conveniently.
However, I could not add axes to the original image after a call to image.plot(); I
2008 Sep 05
3
how to draw the legend about color from 3d picture
I have drawed a picture with persp, it's 3d map with different color,
indicate different altitude. In gnuplot, the corresponding command
'splot' will generate a picture beside to indicate the relationship
between color and altitude. But in R, how to draw it? I have read the
manual of legend, but they are all about how to draw a legend with
colored text, not a continuous varing color
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:
2010 Feb 08
1
Color intervals in image.plot function
Hi,
The script below is my current coding in order to produce a contour plot of temperature across altitude and time. In my case,?time,altitude and temperature?are represented by x, y and z variables.
##############################################
Brazilan.Pallete <- colorRampPalette(c("blue","green","yellow","red"))
image.plot(x, y, z, col =
2006 Mar 14
1
Ordered logistic regression in R vs in SAS
I tried the following ordered logistic regression in R:
mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot)
But when I asked The summary of my regression I got the folloing error message:
> summary (mod1)
Re-fitting to get Hessian
Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) :
the initial value of 'vmin' is not
2005 Mar 30
1
Finding the "height of a line of text" for axis
I would like to draw only the ticks of an axis, but not the axis
itself. I don't think this can be done using axis(), so I am trying to
write a cut-down version in R, which only draws ticks.
The point at which I am stuck is that the length of a tick is set by
par("tcl") as a fraction of the "height of a line of text". So I would
like to draw a line whose length is also
2017 Jun 09
1
Exercise in R
Hi i need some help with this exercise:
FIles: https://mega.nz/#!JxMFGIwC!qA85SBIBRVagCzYfmLwSvGuNK_qXqCXrakPxXryCpGg
#PARZIAL 3: GEO
#Data:
# Shapefile "INCOME" contains dummy information about revenue
# Common Abbreviations in the "INCOME" variable and the centroid altitude
#dell common in the variable "ALT"
#Richieste
# 1
#map of the variable