Displaying 20 results from an estimated 9000 matches similar to: "ticks at the Y axis"
2005 May 25
1
Plot: Distance between tick and tick label on y-axis
Hello,
I want to reduce the distance between my ticks and their labels. I managed
to do it for the x-axis, but the y-axis puzzles me. Here's an example where
there is no space between the x-asix ticks and labels.
par(las=1)
plot(runif(50), type="l",xaxt="n",yaxt="n",ylab="", bty="l")
axis(2)
axis(1,padj=-1.5)
#However,
axis(2,padj=-1.5)
2013 Feb 14
5
plot custom x axis ticks values
Readers,
For this data set:
testvalues<-c(10,20,30,40)
How to amend the plot instruction:
plot(testvalues,ann=FALSE,type='l',yaxt='n',xaxt='n')
so that x axis ticks labels can be added to existing graph with
arbitrary value such as 0,100,200,300)?
Thanks in advance.
--
r2151
2011 Apr 26
0
Immutable ticks using ts.plot?
Hello all-
?
What I'm going for here is a stack of four time series plots that use a common X axis on the bottom plot. And setting up customized tick marks on each plot that help illustrate the respective trends. Here's my code:
?
#### Start ####
fig_data <- ts(read.csv("F:/mydata.csv"), start=2000, end=2010, freq=1)
opar = par()
plot(fig_data, ann = FALSE, plot.type =
2007 Oct 18
5
Secondary Y axis title
I have the following R code to create a plot with two y axes. I am
essentially trying to
plot a price series with a volume series on the same graph. (i.e. to
compare price with volume). I can label the first
y axis successfully, but the problem is in labeling the 2nd y-axis.
Essentially, the
label never appears. It seems as though there is not enough margin
on the right hand
side of
2009 Jan 22
1
infer haplotypes phasing trios tdthap
Dear R mailing list,
I have a dataset with genotypes from trios and I would like to infer
haplotypes for each mother, father and child. The package that I could
find that can do this is tdthap.
But when the mother is homozygous (e.g., 2/2) the haplotype is called as
not possible to infer (0); I would prefer for it to call the genotype
(2). From what I understand it is doing what I would like
2006 Jun 09
1
Rotate values on Y axis
Hi,
I have been working through one of the examples on the FAQ about
rotating the labels on the x axis, I need to do the same but for the y
axis. I have managed to change some of the code, but I am still not
getting there, there is still something wrong. My syntax is as follows:
> par(mar = c(5, 7, 4, 2) + 0.1)
> plot(1 : 8, yaxt = "n", ylab = "")
> axis(2,
2007 Mar 22
1
Labelling a second y-axis
Hi,
I am using the following code as an example function to create
multiple y-axes on one plot. I have it working fine however, I can't
seem to add a label on the second (right) axis. I have tried adding
ylab="y2" in the axis call but, that didn't work; any ideas?
Thanks,
Jesse
Code:
function() {
par(las=1,xaxs="r",mai=c(1,0.75,1,1))
x<-1:10
y1<-x
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
2006 Feb 27
1
log scale y axis ticks control on boxplots
Hey R Users
I like to control the ticks and labels in a boxplot as described for a
xyplot below (thread in maillinglist in may 2003). Does anybody knows
how it works?
Thanks in advance
Thomas
Thread from May 2003
(http://tolstoy.newcastle.edu.au/R/help/03a/5604.html)
Hello R Users!
I'm using lattice to produce some graphs with logaritmic y-scales. I use
the command
xyplot(hits ~
2001 Jul 14
1
Secondary y-axis
Dear R Users,
I have been trying to add a secondary y-axis to an existing plot. I thought
this could be a trivial matter and have checked the Manual and Mailing List
Archive to see If I can find a solution.
It appears the suggested method by Uwe Ligges (fot from the Archive) did not
work. I am getting an error message saying the "Error in plot.new() : axis
style "d"
2008 Mar 21
1
hist function+label second y-axis
Dear Forum,
hist(x$LAN_3,col="green",xaxt='n',yaxt='n',xlab="",ylab="",main="",type="l")
I?d like to craete a line not a bar in the hist function, but regrettably I
get only warning messages:
1: Grafikparameter "type" ist veraltet in: title(main, sub, xlab, ylab,
line, outer, ...)
2: Grafikparameter "type" ist
2018 May 08
0
Adding Year-Month-Day to X axis
Hi Greg,
This is because both plots have equally spaced x values. To see the
difference, try this:
plot (x_yyyymmdd, y_duration, type="l", xaxt="n", yaxt="n",
ylim=range(240,480), xlab="", ylab="", col="blue")
axis(1)
plot ( y_duration, type="l", xaxt="n", yaxt="n",
ylim=range(240,480),
2009 Jan 28
2
help with plot layout
It takes a lot of sweat to generate a composite plot with R ... sigh.
I though I was almost done when I met the umpteenth hurdle. I cannot place a nice title on the 2nd plot (raw signal)
on the layout. I do not have control on where either the "main" option of "plot" function, or "title", place the text
string which keeps dysplaying chopped from above. I also tried
2017 Aug 11
2
Annotation Ticks on the axis
Hi all,
I would like to have help in getting annotation ticks (corresponding to the
minor grid) on my plot. Here is my toy example :
par(mar=c(5, 6, 5, 5) + 0.1)
x<-1:10
y<-x^2
plot(x,y,log="xy",xlab="log(x)",ylab="log(y)")
par(new=T)
2011 Dec 13
0
Time series plots- x axis frequency issues
Hi,
I am trying to create a TS residual plot for a weekly data set over several
years. However, the data set obtains alot of missing data which has been
omitted from the analysis. The only issue is when I make the plot for the TS
residual graph you have to state the frequency in the coding i.e. freq= 52.
This is a problem as some years only have 40 weeks of data etc. This means
instead of showing
2003 Nov 07
1
y label after axis (4)
Hi,
I am trying to figure out how to lable the second y-axis after the following
codes:
plot(x, y,
xlab="time",
ylab="pay1"
)
par(new=TRUE)
plot(x,y2,
ann=FALSE,
xaxt="n",
yaxt="n",
pch=7
)
axis(4)
Then, I want to label the second y axis "pay2". I tried "title(ylab="pay2")",
but it put this lable on the first
2017 Aug 11
0
Annotation Ticks on the axis
Hi
see in line
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Vivek
> Sutradhara
> Sent: Friday, August 11, 2017 11:02 AM
> To: r-help <r-help at r-project.org>
> Subject: [R] Annotation Ticks on the axis
>
> Hi all,
>
> I would like to have help in getting annotation ticks (corresponding to the
> minor
2011 Jan 20
1
Scale of 2nd y-axis
Dear list,
My query follows on from a question I posted a few days ago. I have the following 2 sets of data:
wetMeans[1] 9.904762[2] 6.344828[3] 6.346154[4] 6.855769[5] 9.074324[6] 9.953988[7] 13.482966[8] 14.546053[9] 10.841584[10] 9.752033[11] 6.739336[12] 8.955056burnMeans[1] 0.06214286[2] 0.05396552[3] 0.04096154[4] 0.05302885[5] 0.05831081[6] 0.07392638[7] 0.29969940[8] 0.25596217[9]
2007 Jan 10
0
axis labels at subset of tick marks
For example, this works:
x = seq(-100, 1000, 25)
y = x * x
plot(x,y, xaxt="n")
axis(1,x,FALSE,tcl=-0.3)
axis(1,x[x %% 100 ==0])
It creates two axis objects and the values of the x-axis are the
labels. The following scenario is more difficult, because it uses
'image' to plot a grid of values:
a = matrix(rnorm(100),ncol=10)
image(1:ncol(a), 1:nrow(a), a, xaxt="n",
2018 May 08
1
Adding Year-Month-Day to X axis
I do not see any difference between the x versus y plot drawn in blue, and the y only plot drawn in red. Is the correct?
Greg
y_duration <- c (301.59050, 387.35700, 365.64366, 317.26150, 321.71883, 342.44950, 318.95350, 322.33233, 330.60333, 428.99516, 297.82066, 258.23166, 282.01816, 280.00000)
x_yyyymmdd <-as.Date(c ("2018-04-25", "2018-04-26", "2018-04-27",