Displaying 20 results from an estimated 1000 matches similar to: "Multiple area plots to share the same x-axis"
2011 Mar 24
1
questions regarding stat_smooth in ggplot area plot
Hello,
I drew a simple area plot using ggplot2 using
set <- read.table(file="http://www.jovian.nl/set.csv", head=1, sep=",")
library(ggplot2)
ggplot() +
layer(
data = set, mapping = aes(x = time, y = hours),
geom = "area", stat="smooth", color="red"
) +
layer(
data = set, mapping = aes(x = time, y = hours),
geom = "area",
2010 Feb 03
1
color blending and transparency
I am using ggplot and posted this question at that helplist. It was
suggested that I try a more general R-help list for a possible solution to
this problem.
Within ggplot, I am using geom_area with red and blue and expect where they
overlap should be purple. But instead, it's dark red.
Playing with alpha and with different colors doesn't seem to solve the
problem.
Here's a very
2023 Mar 27
1
Cambiar orden top-down stacked area ggplot2
Buenos días, con el código de abajo obtengo un agregate que empieza por
abajo con la categoría C7 y termina arriba por la C1. Me gustaría que
fuera al revés, que la C1 estuviera abajo y ascendiera hasta tener la C7
arriba.
Gracias,
Manuel
year<-c(rep(1990, times=7),rep(2018, times=7),rep(2040, times=7),rep(2060,
times=7),rep(2080, times=7),rep(2100, times=7))
2011 Mar 08
3
allocating factor levels
Dear R users,
I am working on allocating the rows within a dataframe into some
factor levels.Consider the following dataframe:
Start.action Start.time
1 Start.setting 2010-12-30 17:58:00
2 Start.setting 2010-12-30 18:40:00
3 Start.setting 2010-12-31 22:39:00
4 Start.setting 2010-12-31 23:24:00
5
2009 Dec 11
4
extracting vectors from lists of lists
Good evening
I often have as output from simulations a list of various values, vectors
and matrices.
Supposing that I then run said simulation several times, I often want to
extract a particular result from each simulation for plotting and,
ideally, put it in a matrix.
A simple example
v1 <- 1:5
v2 <- 6:10
other1 <- "stuff"
other2 <- "stuff"
set1 <-
2008 Sep 24
1
qplot, stacked area, own colourscheme
Dear list,
I would like to apply my own colours to a stacked area plot, done with
qplot, but I have not succeeded...
What do I have so far (I am dealing with the development of cover of
specific groups of plants):
library(ggplot2)
library(RODBC)
channel <- odbcConnect("myusername", case="tolower")
sql <- "select trial, cover_of, dateofsurvey, cover from
2011 Jul 13
1
UNIX diff function
Colleagues,
(R: 2.13.0; OS X)
I often receive sequential datasets in which there are new rows interposed between existing rows. For example:
SET1 <- data.frame(list(LETTERS=LETTERS[c(1:4, 6:10)], NUMBERS=c(1:4, 6:10)))
SET2 <- data.frame(list(LETTERS=LETTERS[1:10], NUMBERS=1:10))
> SET1
LETTERS NUMBERS
1 A 1
2 B 2
3 C 3
4 D 4
5
2007 Apr 28
1
The confidence level of p-value of ks.boot
Hello!
I need to compare 2 datasets whether they come from the same distribution. I use function ks.boot{Matching}. And what is the confidence level of the p-value, returned by ks.boot function?
The code is:
set=read.table("http://stella.sai.msu.ru:8080/~gala/data/testsets.csv",
header=T,sep=',')
set1=set[!is.na(set$set1),'set1']
2017 Mar 09
4
[RFC] bitfield access shrinking
In http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20120827/063200.html,
consecutive bitfields are wrapped as a group and represented as a
large integer and emits loads stores and bit operations appropriate
for extracting bits from within it. It fixes the problem of violating
C++11 memory model that original widen load/store of bitfield was
facing. It also brings more coalescing
2009 Oct 14
1
pairs
Dear all,
I have two sets of data (say set1 and set2) as follow:
set1
x1
x2
x3
0.30
0.43
3.88
0.38
0.59
3.53
0.30
0.42
2.12
0.33
0.53
2.12
0.30
0.47
3.76
set2
y1
y2
y3
0.32
0.47
5.18
0.23
0.26
1.06
0.42
0.65
3.88
0.28
0.38
3.76
0.35
0.47
1.41
The "pairs" function (such as pairs(~x1+x2+x3 data=set1, main="Simple Scatterplot Matrix") ) is
2010 Jan 26
5
Strange tick in ggplot geom_area; and ordering, again
In the area plots below, I see 4 triangle ticks at both sides of the bar; I
believe these are non-stacked values for p, but they are definitively
confusing.
In addition, I would like to get the order of the colors in the plot the
same as in the legend, and not arranged alphabetically (the factor is
ordered, don't touch my order). Hadley once mentioned an undocumented
aestetics
2011 Nov 03
1
For loop to cycle through datasets of differing lengths
I have encountered this problem on several occasions and am not sure how to
handle it. I use for-loops to cycle through datasets. When each dataset is
of equal length, it works fine as I can combine the datasets and have each
loop pick up a different column, but when the datasets are differing
lengths, I am struggling. Here is an example:
A<-1:10
B<-1:15
C<-1:18
2017 Mar 09
3
[RFC] bitfield access shrinking
On 03/09/2017 12:28 PM, Krzysztof Parzyszek via llvm-dev wrote:
> We could add intrinsics to extract/insert a bitfield, which would
> simplify a lot of that bitwise logic.
But then you need to teach a bunch of places about how to simply them,
fold using bitwise logic and other things that reduce demanded bits into
them, etc. This seems like a difficult tradeoff.
-Hal
>
>
2010 Feb 08
3
ggplot2 stacked line plot
Hi all,
I have been hunting around for hours trying to figure out how to
generate a stacked line chart using ggplot2. This type of chart can be
generated in excel 2007 by selecting: Chart type > Line > Stacked
line. I can generate a stacked area chart using the following code:
p <- ggplot2(~, aes(x = ~, y = ~, colour = Type)) +
geom_area(aes(position = 'stack', fill = Type))
2007 Sep 08
1
Problem with the aggregate command
Dear friends,
I have a data set with 23 columns and 38000 rows. It is a panel running from the years 1991 through 2005. I want to aggregate the data and get the medians of each of the 23 columns for each of the years. In other words my output should be like this
Year Median
1991 123
1992 145
1993 132
etc.
The sample lines of code to do this operation is
set1 <-
2017 Mar 09
4
[RFC] bitfield access shrinking
On Thu, Mar 9, 2017 at 10:54 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> On 03/09/2017 12:14 PM, Wei Mi via llvm-dev wrote:
>>
>> In
>> http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20120827/063200.html,
>> consecutive bitfields are wrapped as a group and represented as a
>> large integer and emits loads stores and bit operations appropriate
2010 Aug 09
1
Smart Indexing
Hi all,
Suppose that I've two data frames, a and b say, both containing a column
'id'. While data frame 'a' contains multiple rows sharing the same id,
data frame 'b' contains just one entry per id (i.e. a 1 to n
relationship). For the ease of modeling I now want to generate a new
data frame c, which is basically a copy of data frame 'a' augmented by
the values
2004 Jul 21
2
Cutting heatmap dendrogram
Hello,
I've been clustering my data using hclust and cutting the resulting tree
with cutree. Separately, I visualize the clusterings with heatmap. Is it
possible to have the dendrogram on the heatmap reflect the cutree results?
That is, instead of having one large dendrogram, it would have 4 or 25 in
the example below. Any guidance on if that's possible or not, and what
kinds of
2009 Jan 22
1
ggplot2 example
I need to plot two graphics just like the example below but for some reason your example crashes. Using facet_wrap seems to be the cause:
library(ggplot2)
upper <- with(economics, data.frame(date,value = psavert, position = "upper"))
upper
lower <- with(economics, data.frame(date,value = unemploy,position = "lower"))
lower
#upper$date <-
2003 Mar 24
2
Box Plot Question
I would like to create 15 box plots from two sets of data.
Set1 - containts PayGrade, Min_Salary, Max_Salary data for 15 pay grades
Set2 - contains PayGrade, Actual_Min, Actual_Max, and Actual_Mean for the 15
pay grades
I would like 15 box plots (one for each paygrade) whose whiskers were the
Min_Salary and Max_Salary data
and whose ''box'' was Actual_Min, Actual_Mean,