similar to: adding custom axis to image.plot() and strange clipping behavior

Displaying 20 results from an estimated 10000 matches similar to: "adding custom axis to image.plot() and strange clipping behavior"

2009 Jul 09
2
X-axis labels not displayed when changing ylim
Dear R users, I am encountering a x axis labeling problem on quite basic plots... I use the following code which displays the labels on the x-axis with a 45 degrees angle: p <- plot(myobject1, type="b", col="red",cex=1, lwd=2, axes=FALSE, ann=FALSE, ylim=c(0,70)) title(main="title", font.main=4) axis(side=1, lab=F) text(axTicks(1), par("usr")[3] - 2,
2008 Feb 22
1
Clipping using par(plt=..., xpd=FALSE) inconsistencies
Here is a demonstration of behaviour that is probably an optimization by someone far smarter than me that did not anticipate anyone wanting to do this, but for my purposes it looks more like a bug than a feature. I have tested this with R2.6.2 on Windows, no additional packages loaded (beyond the default), I have tested using the default graphics object, pdf, jpeg, and cairoDevice (ok I loaded 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:
2001 Sep 19
1
Bizarre clipping with abline and points (PR#1095)
I want to put some points along the horizontal axis. > plot(1:10, 1:10) > points(4, par("usr")[3], xpd=TRUE) > abline(v=5) works fine for me. But if I try > plot(1:10, 1:10) > abline(v=5) > points(4, par("usr")[3], xpd=TRUE) then the points are clipped. The call to abline seems to be enforcing xpd=FALSE for later calls to the plot. Cheers, Jonathan.
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")
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 <-
2008 Aug 01
0
standardize ggplot and lattice themes
Dear list, I'm writing a long document (thesis) and as much as I would like to use only ggplot2 for the graphics, some features are still a bit undocumented so I often end up choosing either ggplot2, lattice, or base plots (which i know better) depending on the particular graph to produce. With the default settings, this does not make for a consistent look I would like to see
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
2000 Nov 29
0
abline() AND rect() do not obey "xpd" (clipping) (PR#750)
>>>>> "MM" == Martin Maechler <maechler@stat.math.ethz.ch> writes: MM> This is not a bug in the very strict sense, MM> but for consistency, MM> I feel that MM> abline() MM> should obey par("xpd") setting, even by ...-argument. MM> The following code shows how lines() ``works'' and abline() does not :
2009 Jul 16
2
GGPLOT Clipping Regions
Hi there, I'm trying to find out the command to stop clipping to plot region in ggplot. I have a bar chart (axis flipped) with labels on the bars, but the labels are clipped at the plot region box. I know it's possible to turn this off for base and lattice, but how about ggplot? par(xpd=NA) The ggplot2 manual doesn't seem to mention it, and a search for ggplot and
2017 Jul 26
2
axis() after image.plot() does not work except if points() is inserted between
Thanks... I agree that the problem was explained in the documentation but I can't find a way to have axis() working even manipulating par("plt") or with graphics.reset = TRUE: - adding graphics.reset=TRUE does not allow axis() to be shown; - I see that par()$plt is involved but it is the not sufficient to explain why axis() works because if it is changed by hand, axes are not
2017 Jul 24
2
axis() after image.plot() does not work except if points() is inserted between
Thanks for the proposition. As you see bellow, par("usr") is the same before and after the points() (the full code is bellow): .... > par("usr") [1] -0.2500000 1.2500000 -0.1666667 1.1666667 > # if you remove this points() function, axis will show nothing. > > points(1.5, 1.5, type="p") > p2 <- par(no.readonly=TRUE) > par("usr")
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
2017 Jul 25
0
axis() after image.plot() does not work except if points() is inserted between
>>>>> Marc Girondot via R-help <r-help at r-project.org> >>>>> on Mon, 24 Jul 2017 09:35:06 +0200 writes: > Thanks for the proposition. As you see bellow, par("usr") is the same > before and after the points() (the full code is bellow): > .... >> par("usr") > [1] -0.2500000 1.2500000 -0.1666667
2009 Sep 29
1
axis scale issues....
I have read all the help on axis scales, which seems to be much harder to deal with than it should be, given how common the need to alter axes. Anyway....yeah, suppress the axis using yaxt then call and define the new scale using axis(). The problem is, this doesn't change the actual axis, only the text. Example: plot(1:length(TreeDensity.df$Description[which(TreeDensity.df$Description ==
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
2010 Feb 02
2
barplot y axis too short
Hello, The function barplot automatically creates a y-axis that doesn't necessarily cover the range of y-values to be plotted. I know how to manually create my own y-axis so that it does cover the range, but I was wondering if there is some parameter to change so that the scale of the y-axis is automatically taller than the tallest bar. I thought setting xpd=F would do it, since it says that
2010 Oct 05
2
is there a way to avoid "traveling" grid?
Hello! If you run the whole code below, it'll produce a stacked diagram. And it looks good - because the tick-marks are aligned with the grid. However, if I stretch the graph window, grid becomes misaligned with the tickmarks. Or, rather, it seems aligned for the first and the last tick mark, but not for tickmarks in between. Can it be addressed? Thank you! Dimitri ### Creating a data set
2008 Aug 13
1
reverse orientation of text in plot margins
Dear R users, I am trying to reverse the orientation of axis labels and title in the right margin of a plot, so that they read from top to bottom. I know that this can be done using text() as follows: par(mar=c(5,4,4,4)+.1) plot(1:4,las=0) par(new=T) y <- rnorm(4) plot(y,axes=FALSE,ann=FALSE,pch=17) axis(4,labels=FALSE) par(xpd=TRUE)
2017 Jul 28
0
[FORGED] Re: axis() after image.plot() does not work except if points() is inserted between
Hi I believe this is a clipping bug in the 'graphics' package. A simpler version of the problem is this ... plot(1:10) mtext("margin-label", side=2, at=9, las=1, line=1, adj=0) par(mfg=c(1,1)) ## Only the text within the plot region is drawn mtext("margin-label", side=2, at=9, las=1, line=1, adj=0, col="red") I have committed a fix to the development