Displaying 20 results from an estimated 10000 matches similar to: "graphics: axis label"
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,
2005 Aug 18
1
axis label justified
Hi, I am trying to make my axis labels left justified,
and have used adj=0 in the axis() without success. Can
anyone have a suggestion?
axis(2,at=1:50,labels=paste('a',1:50,sep=''),las=2,cex.axis=0.5,adj=0,tck=0,mgp=c(3,0.5,0))
Thanks
2011 Apr 16
2
Rotating the x-axis labels of a barplot
Dear listserv,
Here is my latest formatting problem. I would like to rotate the x-axis labels
by 45 degrees on a _barplot_. Apparently this is slightly different from the
example given in the R FAQ, which is for rotating the x-axis labels on a
scatterplot
(http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f).
I have adapted that code, as best I could, and
2006 Apr 27
1
losing x-label when exporting to PNG
I have a simple barplot that looks fine in the R
graphics device window. However when I export it to
png I am losing the x-label. It must be an obvious
problem but I cannot see it. Trying to resize the plot
does not seem to help. Code is below.
Any help gratefully received.
###### Start Code############
Groups <-c(21.8,45, 43, 17.2, 8.3, 18)
names(Groups) <- c("Exeter",
2002 Oct 13
1
barplot(): X-Axis Labels
Hello all. I have a simple barplot with sixteen different segments. When I plot my data, only five or six of the labels are showing in the x-axis. How do go get them all to show? Can I set them at a 45.degree angle? Thank you.
Jess
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
2006 Jun 27
2
horizontal yaxis label
Dear all,
I wonder how to get an horizontal label for the y axis in the plot function. I have looked at par and many function but didn't find it.
more specifically , let:
df <- data.frame(cbind(1:10, 11:20))
names(df) <- c("y","x")
plot(y ~ x, data = df, ylab = "dependent")
how to ask R to have the label
2004 Sep 07
2
using text on the x axis ticks rather than numbers
Hello,
is there a way in which I can use text labels rather than numbers on
the x axis ticks? I basically have a vector of (say) 8 points and I want
to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
Rather than having the labels 1 .. 8 I would like to have some arbitrary
text labels.
Ideally I would like the labels to be rotated (say at 45 degrees) so
that they don't
2004 Sep 07
2
using text on the x axis ticks rather than numbers
Hello,
is there a way in which I can use text labels rather than numbers on
the x axis ticks? I basically have a vector of (say) 8 points and I want
to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
Rather than having the labels 1 .. 8 I would like to have some arbitrary
text labels.
Ideally I would like the labels to be rotated (say at 45 degrees) so
that they don't
2010 Oct 07
2
text/mtext axis labels on graphs
Hello everyone
I have problem with axis labels on graphs, I have my code as below:
plot(0,0,xlim=c(1,ncol(PA)),ylim=c(1,nrow(PA)),main="Stratigraphic
Range",xlab="Time
Bins",ylab="Taxa",cex.axis=1.5,cex.lab=2,cex.main=2.5,mgp=c(5,1.5,0),xaxt="n")
text(1:(length(strat_name)), y= 0, adj=1,
srt=45,labels=strat_name,xpd=TRUE, cex=1) #adds text to x
2000 Dec 02
2
axis label rotation
Hello,
I recently switch over from Splus to R and I have not been able to
generate right axis labels that face inwards. This is accomplished
in Splus with the command srt=270 but this option is not supported
in R. In addition the par argument las=0 or 3 does not rotate the
right axis labels.
The editor of a journal is demanding that the right axis labels face
inwards in the figures I recently
2002 Mar 13
3
plot
Hello!
I use the version 1.4.0 for Windows. I have made boxplots but only half of
the symbols (three letters each) show up on the X-axis? How t can one
change their size or orientation so that all show up? I attach the pdf file
to illustrate better the problem.
Regards
Martin
Martin Lascoux
Department of Conservation Biology and Genetics
Evolutionary Biology Center
Norbyv?gen 18D
75236
2024 Nov 28
2
Remove all box around a plot except bottom line (base graphics)
On 2024-11-28 8:36 a.m., Michael Dewey wrote:
> To make the plot clearer I have removed the axes but I wish to remove
> all the boz except the bottom horizontal line. Using the bty parameter
> does not seem to enable me to just leave the horizontal line at the
> foot. I can get the "l" version to remove everything except the left
> hand side and the base. I could also
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,
2011 Jul 26
1
adjusting x-axis labels
I am trying to tweak how my categorical x-axis labels are formatted in
my bar graph. Specifically, I would like to a) decrease the spacing
between lines (e.g. spacing between Dialium and guianensis) b) right
justify the text and c) have each species name align with the center
of the corresponding bar graph.
A simplified version of my code thus far is as follows. I am using
RStudio v.
2007 Mar 23
1
Space for X and Y axis labels
Hello all,
I'm having a bit of a problem with x and y axis labels. Two things:
first, if I want to create a plot with,
plot.new()
plot.window(.....)
axis(1)
axis(2)
lines(...)
points(...)
[etc.]
... where do I introduce the xlab=... and ylab=... commands? I
attempted this in plot.window() but no labels showed up.
Second, here's a bit of real code...
2004 Feb 03
4
how to change one of the axis to normal probability scale
Hi,
I would like to plot a graph with one axis in log scale and the other in
normal probability scale using R. I cannot change the axis scale to
probability scale. What can be a solution? Thanks.
CT
2024 Nov 28
1
Remove all box around a plot except bottom line (base graphics)
That's pretty similar to call axis function, i.e.
?plot(rnorm(100), yaxt="n", bty="n")
?usr <- par("usr")
?## lines(usr[c(1,2)], usr[c(3,3)], xpd = TRUE)
?axis(1, ...) # where 1 is bottom, 2 left, 3 top, and 4 right sides of
the plot box)
Best
Fer
On 11/28/24 14:52, Duncan Murdoch wrote:
> On 2024-11-28 8:36 a.m., Michael Dewey wrote:
>> To
2008 Jul 02
2
position legend below x-axis title
Dear helpers,
I'm using a R script on several different datasets, which makes that
axis scales may vary quite a lot from dataset to dataset. So what I'm
looking for now, is how to automagically find out how to position the
legend (horizontal) in the space below the x-axis title, and how to
make sure that the legend is within the limits of the lower inner or
outer margin?
I'm aware of
2009 Dec 01
1
Aligning Diagonally Oriented Labels Under Bar Chart
I searched the forms (i.e., R Search)?and come up with the following suggested link:
?http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f
I tried to implement what I believe was being implied by that URL and came up with the below:
barplot(WorldPhones[1,],
??????? ylim=c(0, 50000),
??????? axes=FALSE, ann=FALSE,
???????
2009 Jul 29
1
Drawing lines in margins
Hi all,
Quick question: What function can I use to draw a line in the margin of a plot? segments() and lines() both stop at the margin.
In case the answer depends on exactly what I'm trying to do, see below. I'm using R v. 2.8.1 on Windows XP.
Cheers,
Alan
I'm trying to make a horizontal barplot with a column of numbers on the right side. I'd like to put a line between the