Displaying 20 results from an estimated 50000 matches similar to: "Multiple plots question"
2006 Nov 02
3
Better y-axis labels, and x-axis scaling
Hello
I'm plotting some data using matplot with a logarithmic scale on the
y-axis. This is the call to matplot I'm using:
matplot(turns, distances, type = "l", log = "y", lty = "solid",
ylab = "", xlab = "Time steps", col = c("black"))
The values for the 'distances' vector are always between 0 and 1.
The
2017 Jun 20
2
Help with the plot function
I'm trying to recreate a graph similar to the last one found on this link:
https://sites.ualberta.ca/~lkgray/uploads/7/3/6/2/7362679/6c_-_line_plots_with_error_bars.pdf
The difference is that I want budbreak on the top, and the temperatures at
the bottom.
I tried to set par before each graph and include lines, with no avail.
Thanks, Bert.
Andre
On Mon, Jun 19, 2017 at 7:41 PM, Bert Gunter
2017 Jun 20
2
Help with the plot function
Hi, Bert:
Yes, I studied the functions you suggested, but I didn't get to adapt it to
my example whose reproducible code I sent in my first email.
Here it is the code of the functions I studies:
## par
par(mfrow = c(2, 3))
par(cex = 0.6)
par(mar = c(3, 3, 0, 0), oma = c(1, 1, 1, 1))
for (i in 1:6) {
plot(1, 1, type = "n")
mtext(letters[i], side = 3, line = -1, adj = 0.1, cex =
2017 Jun 20
0
Help with the plot function
1. Did you study the functions (esp. ?layout) to which I referred you?
2. Show us your code! -- "to no avail" is meaningless!
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Mon, Jun 19, 2017 at 7:01 PM, Andr? Luis Neves
2017 Jun 20
1
Help with the plot function
Dear all,
I found the last example of this link (
https://sites.ualberta.ca/~lkgray/uploads/7/3/6/2/7362679/6c_-_line_plots_with_error_bars.pdf)
very similar to the one I need to make for my paper, and I think I got what
I wanted by applying some of the suggestions of this mail list.
Here it is the code I devised (maybe there will be further improvements
from the list):
YEAR <- c(1996 ,
2017 Jun 20
0
Help with the plot function
Hi
You are quite close. With slight modification of your code:
par(mfrow = c(2, 1))
par(cex = 0.6)
par(mar = c(0, 0, 0, 0), oma = c(4, 4, 0.5, 0.5))
par(tcl = -0.25)
par(mgp = c(2, 0.6, 0))
plot(BUD~YEAR, type="o", ann=F, axes=F, pch=19, ylim=c(60,100),data=g1)
axis(4, las=2)
mtext("Bud Break (Julian Day)", side=4, padj=4)
arrows(g1$YEAR,g1$BUD, g1$YEAR,g1$BUD + g1$BUD_SE,
2017 Jun 20
2
Help with the plot function
Dear friends,
I have the following dataframe:
YEAR <- c(1996 , 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 )
T_MAR <- c(2.8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5)
T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7)
T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2)
BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92)
BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3)
g1 <-
2017 Jun 20
0
Help with the plot function
See
?layout
?split.screen
?par (the mfrow and mfcol values)
depending exactly on what you want to do and how you want to do it.
Essentially, these all allow you to make separate plots at different
regions of the device.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in
2005 Nov 28
1
Use of axis() in conjunction with plot(..., axes=F)
Colleagues
On occasion, I want to control either tick marks or labels in axes
different from the defaults created with "axes=T" in the plot
command. If I invoke "axes=F" and axis(n), I can do so. However,
the axes produced by axis() differ slightly from those produced
within plot. I have "bty" in par set to "l" (i.e., left and bottom
axes
2005 Jan 11
2
Changing the ranges for the axis in image()
Dear all,
I can not find/understand the solution to this from the help pages:
Say we have the following script:
x<-matrix(c(1,1,0,1,0,1,0,1,1),3,3)
image(x)
How can I change the ranges on the vertical and horizontal axis to a
range of my own or at least place a box frame around the image if I
choose to use "axes=FALSE"?
Apologies for such a bsic question and thanks beforehand
2012 Mar 27
1
Plot of function seems to cut off near edge of domain
Hello helpful R folks,
I am simply trying to graph a quarter circle centered at the origin in the
first quadrant. When I set the xlim of the plot to the radius of the
circle, the plot appears correct. However, I'd like to see a slight
extension of the axes beyond the domain of the function itself. When I do
this, a portion of the plot seems to be missing by the edge of the domain.
Here is
2006 Oct 13
2
Multiple barplots on the same axis
Hi
R newbie here :)
I need to plot 3 barplots in the same axis, something like
|
| _ _ _
| | | _ | | _ | | _
| _ | || | _ | || | _ | || |
| | || || | | || || | | || || |
-+-----------------------------------------
| v1 v2 v3
Is there any documentation describing how to achieve that, and
2009 May 12
2
Multiple plot margins
Hello
I'm plotting 6 graphs using "mfrow = c(2, 3)". In these plots, only
graphs in the first column have titles for the y axis, and only the ones
in the last row have titles for the x axis.
I'd like all plots to be of the same size, and I'm trying to keep them
as near each other as possible, but I'm having the following problem.
If I make a single call to par(mar =
2008 Mar 05
1
Reversed but positive axis in trellis plots?
Hi,
In my discpipline, it is common to plot one acoustic property on a
positive scale but from top to bottom on the ordinate and the same for
another measurement on the abscissa.
So, the origin of the plot is on the top right of the plot, with
increasing values to the left /down. This is to highlight the
correlation between the acoustic measurement and the position of the
forming structure, for
2000 Jun 02
3
graphical parameters in plot
I'm using plot to make a simple plot but I want to control where
the tick marks go on bot axes. The graphical parameters xaxp and
yaxp seem to be ignored by the plot function so I tried setting them
using
op <- par(no.readonly=T)
par(xaxp=c(-2.4,-2.2,5), yaxp=c(-2500,10000,6))
plot(...)
par(op)
but they are still ignored.
Next I tried to use the axis function as follows
op <-
2009 May 27
3
Axis label spanning multiple plots
Hello
I need to plot 3 graphs in a single column; the top two plots have the
same title, and I would like it to be written only once, centered
horizontally and spanning the two plots. Something like
t +------------+
| |
i | |
| |
t +------------+
l +------------+
| |
e | |
| |
1 +------------+
t
2009 Jul 27
3
Working with tables with missing levels
Hello
I'm trying to write a function to calculate the relative entropy between
two distributions. The data I have is in table format, for example:
> t1 <- prop.table(table(c(0,0,2,4,4)))
> t2 <- prop.table(table(c(0,2,2,2,3)))
> t1
0 2 4
0.4 0.2 0.4
> t2
0 2 3
0.2 0.6 0.2
The relative entropy is given by
H[P||Q] = sum(p * log2(p/q))
with the
2009 Oct 27
4
automatically adjusting axis limits
Dear R users,
I am a newbie. Just switched from MATLAB. So thanks a lot for your
patience.
I have 50000 spectra collected in field. Each spectra has two columns :
Wavelength (56) and the actual measurement.
Each measurement came in a different .txt file on disk (50000 files in
total). I wrote a script that reads every spectra in a for loop and
constructs two variables :
Wavelength (56) and
2001 Sep 07
2
biplot
I have started using biplot() (with R1.3.0 on Windows) and have become very
frustrated. As far as I can see, I follow the directions but either it
doesn't do what I want it to do, it gives fairly arcane error messages or
both. All I want to do is plot two separate data sets to see how different
they are from each other with respect to two metrics that are represented by
the two axes.
My
2011 Apr 12
2
multiple lines on multiple plots
I'm sure this must be trivial, but I'm a novice with R and can't work
out how to handle the axes when I am constructing multiple plots on a
page and try to return to a previous one to put multiple data sets it.
A simple example:
---
x<- 1:10
y<- (1:100)*3
par(mfcol=c(2,1))
plot(x)
plot(y)
par(mfg=c(1,1))
lines(x)
---
The first 5 lines make two plots with a row of dots along