Displaying 20 results from an estimated 10000 matches similar to: "[ggplot] controlling axis and major/minor tick marks"
2006 Oct 24
1
[ggplot] trouble with ggabline and log-log-plots
Hello,
I'm trying to generate a log-log plot with ggplot. Within this plot, I
would like to draw a straight line with the help of ggabline which does
not work. The code is
pl1 <- qplot(correlFunc, correlFunc.ref, data=all, log=c("xy"))
pl1 <- ggabline(pl1, slope=1, intercept=0)
print(pl1) ## no line in plot :(
I can produce plots as I want, if I transform all values before
2007 Feb 18
0
Lattice graphics: minor tick marks and panel.axis() question(s)
Hello,
I have been a long-time Traditional graphics user and now moving to
try Lattice graphics. At the moment I cannot figure out how to place
minor tick marks in a figure made with Lattice's xyplot(). In
Traditional graphics, after calling plot() I would make two calls to
axis().
>From the manuals and help documentation I learned that 'scales' takes
multiple 'at'
2018 Apr 25
0
Can't Get Lattice Histogram Minor Tick Marks to Work
Per the Posting Guide, why didn't you post the reproducible R code example?
On April 24, 2018 8:22:15 PM PDT, Donald Macnaughton <donmac at matstat.com> wrote:
>I'm drawing a paneled histogram using the lattice package. I've
>succeeded in
>adding minor tick marks to the vertical axis, but I can't get the
>desired
>number of minor tick marks between the major
2018 Apr 25
3
Can't Get Lattice Histogram Minor Tick Marks to Work
I'm drawing a paneled histogram using the lattice package. I've succeeded in
adding minor tick marks to the vertical axis, but I can't get the desired
number of minor tick marks between the major tick marks.
I've attached a self-contained program to illustrate the problem.
Thanks for your help,
Don Macnaughton
Here's my sessionInfo:
R version 3.4.3 (2017-11-30)
Platform:
2018 Apr 25
1
Can't Get Lattice Histogram Minor Tick Marks to Work
Thanks Jeff,
I attached a file with the program to my earlier email because the posting guide seemed to imply that non-binary attachments would work. But I see that the file was stripped off.
I installed the program file on a web site, but when I downloaded it, the line breaks were stripped out. So I've included the program below:
-------------------------------------------------------
#
2010 Jan 26
5
Strange tick in ggplot geom_area; and ordering, again
In the area plots below, I see 4 triangle ticks at both sides of the bar; I
believe these are non-stacked values for p, but they are definitively
confusing.
In addition, I would like to get the order of the colors in the plot the
same as in the legend, and not arranged alphabetically (the factor is
ordered, don't touch my order). Hadley once mentioned an undocumented
aestetics
2003 Sep 09
1
Changing Tick Marks for Date Plots
I have been experimenting with various approaches to
plotting (irregular) time-series with reasonable
success. One thing I have been able to do is change
the number of tick marks on the axis. Consider the
following simple example:
> x <- as.data.frame(matrix(ncol=2,nrow=500))
> names(x) <- c("dates","values")
> x$dates <- as.POSIXct(Sys.time()+1:500*86400)
2011 Dec 13
2
axis tick colors: only one value allowed?
Hi,
So far as I can tell, the 'col.ticks' parameter for axis() only uses the
first value provided. E.g.:
plot(0:1,0:1, col.ticks=c('blue','red','green')) #all ticks are blue
Just wondering if there's a different option in the basic plot commands
that can handle multiple colors, and also whether ggplot and/or lattice
allow for multiple tick colors.
2011 Jul 09
1
Suppressing the labelling of tick marks on ggplot2
Hi,
I have the follow ggplot2 code I am running:
ggplot(data=bb.res.math,aes(x=factor(id.bb),y=bb.math.comb,fill=BB)) + geom_bar() + facet_grid(BB~.) + scale_fill_brewer(pal="Set1") + ylab("Average Student Residual (Math)") + xlab("Student ID")
The number of unique id.bb is 2207 and so my X-axis has a couple of thousands, indistinguishable tick marks that correspond
2010 Jun 09
1
minor tick marks
Hi !
I need a plot for data extending over several orders of magnitude on the y axis.
The following command generates a nice looking semi-log plot for my data:
plot(x,y,log="y",type="l",lty=3, ylim=c(0.01,2),yaxp=c(0.01,1,1),las=1)
I would appreciate having also minor tick marks in-between the 3 major ticks obtained with the above command. The "minor.tick" function
2011 Jan 16
2
xyplot: modify axis tick marks
Hi,
I would like to plot time against rainfall data (data is at the end)
using xyplot.
The basic code looks like this: xyplot(rainfall~time, type="a")
When I do this, the graph looks ok except that the x-axis has too many
values. I would just like to display the years and not the months on
the x-axis. I've been fiddling around with 'scales', and read previous
posts about
2008 Jul 03
1
ggplot2: scaling and tick mark of x-axis
Dear list,
i am trying to plot data in a way like this:
Date<-seq(as.Date("2006-08-29"), as.Date("2007-08-28"), by="2 weeks")
var<-rnorm(27, 10000, 2500)
err<-rnorm(27, 3000, 1000)
df<-data.frame(cbind(Date, var, err))
library(ggplot2)
g <- ggplot(df, aes(x=Date, y=var,
min=(var - err), max=(var + err)))
g1 <- g + geom_line() + geom_point() +
2009 Jun 01
1
Minor tick marks for date/time ggplot2 (this is better, but not exactly what I want)
library(ggplot2)
melt.updn <- (structure(list(date = structure(c(11808, 11869, 11961, 11992,
12084, 12173, 12265, 12418, 12600, 12631, 12753, 12996, 13057,
13149, 11808, 11869, 11961, 11992, 12084, 12173, 12265, 12418,
12600, 12631, 12753, 12996, 13057, 13149), class = "Date"), site =
structure(c(1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L,
2003 Aug 06
2
Plot ticks and tick labels: thickness, colour?
I am displaying several series in one plot, and would like to make
them distinct without having to employ a legend.
I managed to color tickmarks, but have been unsuccessful with either one of
a) making tickmarks thicker (without increasing the axis at the same time).
From reading ?axis:
lty, lwd: line type, width for the axis line and the tick marks.
in would appear that I cannot
1998 Jun 25
1
R-beta: PostScript tick marks in 62.1
R-users/developers,
I am loosing tick marks that I add to a plot with axis() when plotting
to the postscript device. They show up fine on the x11 device, and work
with the postscript device when the default tickmarks are used (those
added by plot()).
I am using R-62.1 from the RedHat5.0 rpm's on i86 Linux.
Do later snapshots correct this, or is this a running bug in R awaiting
the
1998 Jun 25
1
R-beta: PostScript tick marks in 62.1
R-users/developers,
I am loosing tick marks that I add to a plot with axis() when plotting
to the postscript device. They show up fine on the x11 device, and work
with the postscript device when the default tickmarks are used (those
added by plot()).
I am using R-62.1 from the RedHat5.0 rpm's on i86 Linux.
Do later snapshots correct this, or is this a running bug in R awaiting
the
2010 Feb 02
0
Plot questions: grid line do not correspond to tick marks and 2 line axis label
Hello list,
Thank you very much for replying to my earlier questions. I have a few new
questions about R plots:
Example: tempdata:
RDate Price
2009-12-09 12:00 100
2009-12-09 15:00 99
2009-12-09 18:00 102
....
2009-12-10 8:00 120
2009-12-10 10:00 110
2009-12-10 16:00 105
My code: (RDate already in R date-time class)
plot (price~RDate, data=tempdata, "l")
axis.POSIXct(1,
2008 Jun 16
2
in axis() suppressing axis line but keeping tick marks
I've been trying to figure out a parameter that will let you separately
adjust the parameters for the axis line from the tick mark.
In the following example, I would like to suppress the axis line, but keep
the tick marks.
Thanks,
Andrew
foo <- data.frame(x=1:3, y=4:6)
plot(foo$x, foo$y, type="n", axes=F)
points(foo$x, foo$y)
axis(side=1, at=foo$x, lty=0) #would like to figure
2003 May 18
1
log scale y axis ticks control?
Hello R Users!
I'm using lattice to produce some graphs with logaritmic y-scales. I use
the command
xyplot(hits ~ c(1:1024), data=eichData, type="S", scales=list(y =
list(log=10)))
to create the plot. This is fine, except for the automatically choosen
tick marks. I'd like to have a major tick at the 10^n location and minor
ticks in between which correspond with the native
2009 Mar 20
1
minor tick marks for plots (PR#13616)
Hello,
I think I found a bug:
> windows(1,width = 10, height = 10, pointsize = 5,xpos = 0, ypos = 0 )
> hdata[1:3,1] <- c(1,10,15)
> hdata[1:3,2] <- c(2,1,4)
> plot(hdata[,1],hdata[,2],xaxt="n")
> axis(1,at=c(2,10,14))
> minor.tick(nx=2, ny=1,tick.ratio=1)
the minor tick marks appear between the tick marks which would have been
drawn without the option