Displaying 20 results from an estimated 20000 matches similar to: "Plotting Hints - how to add minor tics on axes"
2007 Dec 19
1
lattice: axes drawn when relation='free' or relation='sliced' but not when relation='same'
I'm using lattice to draw a multi-panel figure: 5 rows, 4 columns. The y-axis for each panel is determined by
yaxs <- list(draw=T
, labels=c(0, '.5', '1', '1.5')
, at=c(0, .5, 1, 1.5)
, tck=c(.4, 0)
, cex=.7
, alternating=2
2007 Oct 15
4
boxplot() confuses x- and y-axes (PR#10345)
Full_Name: Bob O'Hara
Version: 2.6.0
OS: Windows XP
Submission from: (NULL) (88.112.20.250)
Using horizontal=TRUE with boxplot() confuses it as to what is an x- or y-axis.
At least, xlim= and ylim= are the wrong way round, log="x" (or "y") and xaxt=
work as expected, I haven't looked at anything else.
Some code to see if you can reproduce the bug (or discover
2012 Jan 08
2
need help with axis ticks
hi,
i am using par(mrow=c(6,6)) function to get 6x6 plots on one screen. the
problem that i am having is that the axis tick labels are far away from the
ticks and going into previous plots (see attached figure). i need to know
how can i reduce the distance between the ticks and their values (y axis
values).the part of the code that i am using (after reading in the data) to
create the top row is:
2008 Jul 21
2
Getting plot axes where they should be!
Hi Folks,
I've been digging for the solution to this for several
hours now. If there is a solution, it must be one of the
worst "needle-in-a-haystack" examples in R documentation!
Essentially, I want to make an x-y plot in which the
X-axis really is the X-axis (i.e. its vertical position
is at y=0), and the Y-axis really is the Y-axis (i.e.
its horizontal position is at x=0).
2009 May 27
5
r-plot
Dear R-community
I have a grueling problem which appears to be impossible to solve:
I want to make a simple plot, here is my code: http://gist.github.com/118550
Unfortunately, the annotation of both the x- and y-axis are not correct, as
you can see in the following picture:
http://www.nabble.com/file/p23739356/plot.png
I am not an expert of R, so maybe someone can point me to the solution of
2008 May 20
5
Alignment of axes intersection
All,
Very basic question I can't seem to find the answer to:
plot(0:10, 0:10)
The axes intersection is not aligned at (0,0) in the lower left.
How does one force this?
I searched for graphical parameters under par(graphics) but can't seem to
find it.
Thanks!
David
2001 Sep 10
3
inter tick distance
R colleagues,
I am stumped. I would like the inter-tick distances to be the same on the x
and y axes but cannot determine how to do so when the lower half of the y
axis is not printed. Thanks for any and all suggestions. (btw, setting
par(pty="s") does not solve my problem)
Niels Waller
M<-matrix(c(2,1,
-1,3),2,2,byrow=TRUE)
2009 Jun 12
1
Snap axes to origin rather than around it
I'm trying to plot a graph where the axes go through 0,0, rather than around
it combined with a box round the graph, so
x<-0:10;y<-0:10
plot(x,y)
gives me a box but doesn't go through the point 0,0, but stays at a
distance.
In trying to circumvent this problem, I wrote
plot(x,y)
axis(1, pos=c(0,0));axis(2,pos=c(0,0))
which gives me axes that go through the origin, but then I
2000 Oct 26
3
Tick marks for abline
Dear R People:
I am drawing graphs for a College Algebra class. I would like to have
the x and y axes, along with the lines that I am plotting. So I leave
off the axes, and use xlim and ylim. Then I add my abline(v=0).
However, I would like to have tick marks on the abline. How would I do
that, please?
Thanks in advance!
Sincerely,
Erin M. Hodgess, Ph.D.
Associate Professor
Department of
2002 Nov 19
1
Another plot question
Here is another, perhaps trivial, plotting question.
I am making a filled contour plot and have almost everything dialed in
the way I want it. The last hurdle (that I can foresee) is adjusting the
look of the key. I'm plotting the 25%, 50%, 75%, and 95% quantiles and I
want the key to be evenly spaced, e.g., the width of the 25% and the 95%
should look the same on the key. They are labeled
2013 Mar 08
3
2D filled.contour plot with 1D histograms by axes
Hi everyone,
I hope this question is beyond "read the manual". My task is simple, just
to plot the following, but the plot in the middle should be a
filled.contour plot:
http://gallery.r-enthusiasts.com/graph/Scatterplot_with_marginal_histograms_78
Background: I prefer filled.contour rather than hist2d. Because, I could
use kernel smooth, so the plot for discrete data won't be too
2007 Jul 25
3
Constructing bar charts with standard error bars
I am new to R.
I want to graph group data using a "Traditional Bar Chart with Standard
Error Bar", like the kind shown here:
http://samiam.colorado.edu/~mcclella/ftep/twoGroups/twoGroupGraphs.html
Is there a simple way to do this?
So far, I have only figured out how to plot the bars using barplot.
testdata <- scan(, list(group=0,xbar=0,se=0))
400 0.36038 0.02154
200 0.35927
2007 Mar 18
2
ticks labels and R
Hi,
I have plot a graphics by next way:
par(mar=c(5,5,1,1), font.axis=3, ps=14, xaxs="i", yaxs="i", lab=c(18,18,7),
font
.lab=3);
plot(l, b, type="n", xlim=c(0,360), ylim=c(-90,90), xlab="l, deg", ylab="b,
deg");
points(l, b, cex=vel/60, col=1, pch=21);
On this plot I have axis x (denoted by l) ranged in [0,360] with labeling step
20. But I
2004 Mar 11
1
tics and grids
Hi,
Whats the easiest way to set a desired interval for tics on axes in R ?
And will the 'grid' command put gridlines on all tics automatically ?
I tend to get stuck with graphs with ranges 0-1 with only 2 tics and 2
gridlines in the 0-1 range, while I would like 10 tics (or every 0.1)
tnx,
Piet
please reply to pvremortNOSPAM at vub.ac.be
1999 Nov 12
1
some related problems
I just tried to batch-start rgui.exe (not rterm.exe) in a way, that it
read.table()s data from a file with changing filename. As I understand no
command line parameters are available for that, so instead I tried to pass
the filename to an approbriate .RProfile, which works roughly, BUT
## this is my %R_USER%\.RProfile
im <- read.table("d:/temp/im/temp.csv", header=TRUE,
2006 Dec 27
4
axis and times() problem
Dear R-Group,
the first example is working as expected, but I need the plot without
the box,
normally no problem, but I am not able to get the x-axis formatted as
times with the axis, command.
I tried a lot of things, nothing was working so I used the most easy
axis command in the second example here ....
# working
library(chron) # for times()
library(graphics)# for axis
2006 Dec 27
4
axis and times() problem
Dear R-Group,
the first example is working as expected, but I need the plot without
the box,
normally no problem, but I am not able to get the x-axis formatted as
times with the axis, command.
I tried a lot of things, nothing was working so I used the most easy
axis command in the second example here ....
# working
library(chron) # for times()
library(graphics)# for axis
2012 Jan 30
1
about changing line type and line width in Taylor Diagram
Dear all,
I am new to plotting Taylor Diagram using plotrix package within R, hence
this post. I have written a script which plots Taylor Diagram with one
reference and 7 model values. However the font size, line width and line
type are not clear when saving the diagram as a jpeg file. I tried the
functions lty, lwd and font but no apparent change. I am attaching the
script here. Any help would
2006 Aug 08
1
parameter yaxs / function hist (graphics)
Dear R users,
The parameters xaxs and yaxs (function par, package graphics)
seem not to work with the function hist (package graphics),
even when the parameters xlim and ylim are defined.
Is there any way to make yaxs="i" and xaxs="i" work properly
with the function hist, mainly to produce histograms that
"touch" the horizontal axis? The R documentation and the
R
2009 May 14
2
How to do a pretty panel plot?
The pretty picture that I saw at:
http://chartsgraphs.wordpress.com/2009/02/09/r-panel-chart-beats-excel-chart/#more-1096
inspired me to try something similar. The code that I wrote is:
------snipsnip---------------------------------------------------------------------
M <- structure(list(date = structure(c(13634, 13665, 13695, 13726,
13757, 13787, 13818, 13848, 13879, 13910, 13939, 13970,