Displaying 20 results from an estimated 11000 matches similar to: "axis invertion"
2007 Nov 22
4
more outrageous plotting
Dear Contributors:
I have the next matrix:
"X" "Y" "Z"
1 2 526
2 5 723
3 10 110
4 7 1110
5 9 34
6 8 778
7 1 614
8 4 876
9 6 249
10 3 14
I want to order the matrix from bigest Z (1110) to lower Z (14).
Then I want to asign a color scale vector from blue ( bigest Z) to
orange
2007 Jul 05
3
help with vector construction
Hi all,
I want to make a vector with the third column of a matrix, but only for the
2+3n rows of the matrix, with n being an entire number from 0 to a million.
How can I do that in an easy way?
Thanks in advance,
Juan Pablo
[[alternative HTML version deleted]]
2008 Jan 17
1
Res: vector generation
hi Juan,
It is not so elegant, but work fine. I know that our colleagues can do it on a simple line.
z<-c(526,723,110,1110,34,778,614,249,14)
v1<-NULL
v2<-NULL
for (i in 1:(length(z)-1))
{
for (j in i:length(z))
{
v1<-rbind(v1,z[i])
v2<-rbind(v2,z[j])
}
}
df<-data.frame(cbind(v1=v1,v2=v2))
names(df)<-c("v1","v2")
df$ratio<-df$v1/df$v2
Kind regards,
2007 Feb 27
4
ordered matrix question
Hi all,
Is there an easy way to generate an object wich will be the same matrix, but
ordered by de cfp value?
The data frame consists of numeric columns:
"Block" "X" "Y" "cfp" "yfp" "ID"
0 524 244 213.41795 7.18482109 1
0 556 270 65.383904 9.568372661 2
0 528 316 40.789474
2009 Feb 22
2
filtering a simple matrix
Hi all,
I have the next matrix:
a b c
1 2 23
2 3 42
3 0 54
4 5 23
5 0 22
6 7 21
7 1 20
8 9 19
I want to filter the rows with the values of b higher than 1 in a way that
leaves me the next matrix:
a b c
1 2 23
2 3 42
4
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
2013 May 18
3
bar plot with non-zero starting level
Hi,
I want to plot grouped bars to compare 95% confidence interval estimates
from two models. Each bar represents a 95% confidence interval estimate
of a coefficient from one of the two models. Each group represents
confidence interval estimates of the same coefficient from the two models.
I think such a bar plot will nicely present whether 95% confidence
interval estimates of the same
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
Hi R fans,
As a newbie following the five-hour rule (after hitting my head against
the wall for five hours, post to this list), I am appealing for some
help understanding geom_rect() in ggplot2.
What I want to do is very simple. I want to generate a plot of
rectangles. Each one represents a business cycle. The x-values will be
pairs representing the start and end of each cycle. The y-values
2008 Jul 29
4
Graphics function question
Hello
I have created a graph using the following commands:
<<<
startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T
endBReP3O1T <- diffs$BReP3O1T
x <- seq(47,89, length = 10)
ymin <- min(min(startBReP3O1T), min(endBReP3O1T))
ymax <- max(max(startBReP3O1T), max(endBReP3O1T))
y <- seq(ymin, ymax, length = 10)
plot(x,y, type = 'n', xlab = 'Age', ylab =
2003 Sep 17
1
plot.hclust: dendrogram too large for window (PR#4197)
plot.hclust:
Setting up a window for a dendrogram assumes the first link is
the shortest and the last is the longest. This is not always the
case when the clustering was done with hclust, method="median"
or method="centroid", and the dendrogram sometimes doesn't fit
within the window.
I propose the fix listed below.
src/main/
--- plot.c Wed Sep 17 01:03:39 2003
+++
2009 Aug 06
2
Ylim
Hello All:
Can anybody tell me what is the problem with my program please. I have an
error message as appears below.
My program is:
ifn <- "Jul08_09.LM"
data <- read.table(ifn)
ofn <- "Jul.png"
bitmap(ofn, type = "png256", width = 30, height = 30, pointsize = 30, bg =
"white",res=50)
par(mar=c(5, 5, 3, 2),lwd=5)
2010 Nov 04
5
ggplot output
Dear All,
I have this script:
dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev =
hstat$C.stdev)
ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax =
C_avg + C_stdev)) +
geom_point() +
geom_line() +
geom_errorbar()
dat <- data.frame(Month = hstat$Date,K_avg = hstat$K.avg,K_stdev =
hstat$K.stdev)
ggplot(data = dat, aes(x = Month, y = K_avg,
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers,
I hope there is a really simple solution to my problem.
I've written a function that I saved in an .r file. I source this file
in my code. For a while it worked fine. But then when I run the line:
source("F mylineplot.r")
I started getting a warning:
In readLines(file) : incomplete final line found on 'F mylineplot.r'
I have no idea why - I tried to check and
2008 Jul 30
1
read XML
I have a xml exported by Manifold GIS but I'm not being able to import it
into R using XLM package.
The file have this structure:
<?xml version="1.0" encoding="UTF-8" ?>
- <layout>
<name>Layout 2</name>
<pagesByX>1</pagesByX>
<pagesByY>1</pagesByY>
- <elements>
<legend
2012 Jul 26
2
Error Bars ggplot2
Hello,
I'm attempting to plot error bars side by side rather than stacked on top
of each other with ggplot2. Here is the sample code I am using:
#Code
#Data
spd<-c("s","f","f","s","f","s","s","s","f","f","s","f")
r<-c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5)
2008 Jan 24
4
two histograms in the same graph
Dear Contributors:
I have two vectors x and z, and I want to display the histograms of both
vectors in the same graph, x in red bars, z in blue bars.
If you have any clue on how to do that, I will be very glad to hear it!!!!!!
Thanks in advance again,
Juan Pablo Fededa
[[alternative HTML version deleted]]
2001 Feb 28
1
Spider diagrams
Hi, I am trying to create what are called "spider diagrams" in the geochemical
literature using R. A spider diagram is basically a plot of the atomic number
versus the concentration on a log scale. Lines are drawn from each atomic
number for each sample.
Right now, my data frame looks like:
SAMPLE SITE V3 LA.NASC LAATNUM CE.NASC CEATMNUM
1 1A:001
2013 Feb 03
1
ggplot2 plotting errorbars.
Hi,
i'm using this lines of code:
dodge <-position_dodge(width=0.9)
ggplot(dfm,aes(x = X,y = value)) +
geom_bar(aes(fill = variable), position=dodge, stat="identity") +
geom_errorbar(aes(ymin=value-er, ymax=value+er),width=0.25,
position=dodge,stat="identity")
to plot this data frame
X variable value er
1 A X4 58.74 9.44
2 B X4
2011 Jan 24
1
ggplot2 - ribbon
Dear List,
I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions
so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command
m10 + stat_summary(geom="ribbon", fun.ymin="min", fun.ymax="max")
However the ribbon is a dark grey
2008 Jan 17
3
vector generation
Dear Contributors:
I have the next vector:
"Z"
526
723
110
1110
34
778
614
249
14
I want to generate a vector containing the ratios of all the values
versus all the values of the z vector. I mean a vector containing the
values of 526/723, 526/110, and so on, 723/723, 723/110, and so on,
and so on.
Is this doable in a simple way??
Thanks in advance again,
Juan Pablo Fededa