Displaying 20 results from an estimated 100 matches similar to: "ggplot2: Legend title"
2012 Apr 16
1
ggplot2: scale_shape_manual
Hi,
I was trying to replicate one of the graphs given on the ggplot2 website. I
have given a sample code below. I would like to combine the legends, since
each color is uniquely mapped to a shape.
###
library(ggplot2)
leaves <- letters[1:8]
mat <- matrix(sample(1:1000,32),nrow=16,ncol=2)
colnames(mat) <- paste('t',1:2,sep='')
df <-
2023 Oct 31
0
Missing shapes in legend with scale_shape_manual
I believe the missing shapes are because you had set alpha=0 for the last geom point.
I expect there are better ways, but one way to handle it would be to avoid the filtering, adding columns with med and exercise status, like the following:
# setup with data provided
Date <- c('2023-10-17', '2023-10-16', '2023-10-15', '2023-10-14',
2023 Oct 31
0
Missing shapes in legend with scale_shape_manual
Tim, thanks, it helps very much. It works like a charm.
Wow, there's so much I don't understand about ggplot2 functions,
especially the aes() function. I just discovered the ggplot2-book.org
site, and I hope to read it slowly and carefully over the next couple
of weeks.
Thanks again, Tim, for all your help.
-Kevin
On Tue, 2023-10-31 at 12:35 +0000, Howard, Tim G (DEC) wrote:
> I
2023 Oct 30
1
Missing shapes in legend with scale_shape_manual
Hello,
I'm trying to plot a graph of blood glucose versus date. I also record
conditions, such as missing the previous night's medications, and
missing exercise on the previous day. My data looks like:
> b2[68:74,]
# A tibble: 7 ? 5
Date Time bg missed_meds no_exercise
<date> <time> <dbl> <lgl> <lgl>
1 2023-10-17 08:50
2008 Oct 14
1
ggplot2 plot with symbols and then add line
r <-(structure(list(TSS = c(2.8, 8.4, 11, 1.3, 4.2, 2, 3.4, 14, 8.2,
3.1, 1.4, 0.9, 0.5, 6.1, 9.2, 0.6, 1, 11, 2.4, 1.2, 1.3, 1.3,
0, 1.8, 8, 11, 11, 8.5, 8.5, 1.8, 13, 4.4, 1.4, 2.1, 0.5, 25,
25, 9.3, 6.1, 1.6, 1.5, 19, 19, 24, 9.6, 1.8, 1.4, 1), GPP = c(1.213695235,
3.817313822, 1.267930498, 10.45692825, 3.268295623, 3.505286001,
4.468225245, 0.915653726, 1.635617261, 3.726133898,
2010 Aug 23
2
change order of plot panels in faceted ggplot/qplot
Hi,
I have a 5-paneled figure that i made using the facet function in
qplot (ggplot). I've managed to arrange the panels into two rows/
three columns, but for the sake of easy visual comparisons between
panels in my particular dataset, I want to have the two plots on the
bottom align on the right hand side of the figure instead of the left.
Here's an example:
m <-
2008 Jun 09
2
converting a data set to a format for time series analysis
I currently have a data set describing human subjects enrolled into an
international clinical trial, the name of the hospital enrolling this
human subject, the date when the subject was enrolled, and a vector
with variables representing characteristics of the site (e.g., number
of beds in a hospital). my data sets looks like this:
subject hospital date_enrollment hospital_beds
1 hospitalA
2015 Sep 04
2
Añadir escala a un mapa
Hola a tod en s,
Este es el código principal que utilizo para diseñar mi zona de estudio (cuenca):
png("mapa_zona_estudio.png", units="in", width=9, height=8.5, res=300)
# Vamos a pintar los distintos instrumentos de medida sobre el mapa (junto con éste) y añadimos leyenda
ggmap(mapa, extend='device', legend="left", base_layer=ggplot(datos, aes(x=lon,
2011 Sep 24
1
ggplot2: expression() in legend labels?
Is there any way to use expression() in legend labels with ggplot2?
It seems that things like
> scale_shape_manual(value = c(
> x = expression(italic(x)),
> y = expression(italic(y))
> ))
don't work.
Thanks very much :)
--
Using GPG/PGP? Please get my current public key (ID: 0xAEF6A134,
valid from 2010 to 2013) from a key server.
-------------- next part --------------
2008 Jul 03
1
ggplot2 legend for vertical lines
Dear all,
The following example code produces a graph with ggplot2, to which I
add several vertical lines of arbitrary colors. I am not satisfied
with the legend: it automatically adds some vertical lines which I'd
rather not see (they confuse the reader rather than add information
in this case).
> library(ggplot2)
> dfr <- data.frame(values = sin(1:50/10),
> fact =
2024 Jun 14
1
Users appears as SID instead of their own name.
Dear group members.
I have a Samba 4 (4.6.5) running without problems.
Now, using a W2022 server enrolled on the AD, when I add someone from AD
to a local group (like remote desktop group), the user is added but it
appears with their SID instead of name. However the rights are correctly
applied.
Another W2012R2 enrolled on same AD is running fine. All AD objects
included on local group appears
2010 Feb 04
4
BDC & passwd changes
Hello
I have a network setup with one Samba PDC and two Samba BDCs separated by routers (ref http://www.cybersource.com.au/users/mikef/samba/). In this test environment the Samba servers all use the master OpenLDAP server on the PDC, but the production system will have OpenLDAP servers (using master-slave replication) on all Samba servers.
I can't get the Windows XP client to change a
2011 Aug 24
1
Scatter plots, linear regression in ggplot2
Hi,
Based on some modification that I did to the R Cookbook Graphs Scatterplots
code, link:http://wiki.stdout.org/rcookbook/Graphs/Scatterplots%20(ggplot2)
I have some questions and I will appreciate a help:
- How do I change the legend title?
- How can I change the for each linear regression its color and linetype?
- How can I add for both the linear regression lines their equations and
Rseq
2011 Nov 08
2
nesting scale_manual caracteristics in ggplot
Hi there,
I am having a little problem with combining three scale_manual commands in a
facet plot. I am not able to combine the three different characteristics,
instead ending up with three different descriptions next to the graph for
the same geom. I would like to see two separate labels (not three); one
describing lines 1-7 and the other 8-14. For each of the treatments (A-B) I
want a
2024 Jun 14
1
Users appears as SID instead of their own name.
On Fri, 14 Jun 2024 20:07:16 +0200
Josep M Gorro via samba <samba at lists.samba.org> wrote:
> Dear group members.
>
> I have a Samba 4 (4.6.5) running without problems.
Er no, you have one really big problem, Samba 4.6.x went EOL (from the
Samba point of view) nearly six years ago.
>
> Now, using a W2022 server enrolled on the AD, when I add someone from
> AD to a
2011 Sep 07
2
ggplot2-Issue placing error bars behind data points
Hi all,
This seems like a basic problem, but no amount of playing with the code has
solved it. I have a time-series data set like that shown below (only longer)
and am seeking to plot the data with filled, circular points and error bars.
I would like the error bars to be behind the points otherwise they tend to
obscure the points (especially when I have a lot of points in the actual
data set).
2018 Feb 20
3
[GSOC 2018] Information gathering
Hello,
I'm Paul Semel, a French student in computer science. I am currently in
my 4th year (1st year of graduate school) at EPITA and enrolled in the
system and security laboratory of the school.
I would be very interested in working on a LLVM project during this
GSoC. Implementing a PoC for an unsequenced modification checker in CSA
helped me discover LLVM. However, I would like to
2004 Aug 19
6
Is R good for not-professional-statistician, un-mathematical clinical researchers?
Alternate title: How can I persuade my students that R is for them?
Alternate title: Can R replace SAS, SPSS or Stata for clinicians?
I am teaching introductory statistics to twelve physicians and two veterinarians
who have enrolled in a Mentored Clinical Research Training Program. My course is the
first in a sequence of three. We (the instructors of this sequence) chose to teach
R rather than
2018 Mar 01
0
[cfe-dev] [GSOC 2018] Information gathering
Hey,
On 02/20/2018 11:51 PM, Paul Semel wrote:
> Hello,
>
>
> I'm Paul Semel, a French student in computer science. I am currently in
> my 4th year (1st year of graduate school) at EPITA and enrolled in the
> system and security laboratory of the school.
>
> I would be very interested in working on a LLVM project during this
> GSoC. Implementing a PoC for an
2011 Oct 26
2
Help with a scatter plot
Hi everyone,
I have some data about a market research which I want to arrange in one plot
for easy viewing,
the data looks something like:
Product Color StoreA StoreB StoreC StoreD Price
ProdA R NA 4.33 2 4.33 35
G NA 4.33 2 4.33
35
B