s***@gmail.com
2018-09-10 10:00:55 UTC
Can some of you help me with the following problem?
I have data from different time point, but at the start I only have data of
1 treatment instead of 8.
Example data:
Time Treatment response
1 1 A 5
2 2 A 7
3 2 B 8
4 2 C 6
5 2 D 8
6 2 E 3
7 2 F 9
8 2 G 6
9 2 H 5
10 3 A 2
11 3 B 5
12 3 C 8
13 3 D 6
14 3 E 7
15 3 F 9
16 3 G 2
17 3 H 5
If you plot this data you get a graph that looks like:
a = ggplot(test, aes(x = Time, y=Response, fill=Treatment))
a +
geom_bar(stat = 'identity', position = 'dodge')
I would not like to add at time 1 for all other treatments a "0", but I
would like to decrease only the bar width of treatment A at time 1 to the
same as the bar width of the other bars in the other 2 timepoints.
Is this possible in ggplot2?
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I have data from different time point, but at the start I only have data of
1 treatment instead of 8.
Example data:
Time Treatment response
1 1 A 5
2 2 A 7
3 2 B 8
4 2 C 6
5 2 D 8
6 2 E 3
7 2 F 9
8 2 G 6
9 2 H 5
10 3 A 2
11 3 B 5
12 3 C 8
13 3 D 6
14 3 E 7
15 3 F 9
16 3 G 2
17 3 H 5
If you plot this data you get a graph that looks like:
a = ggplot(test, aes(x = Time, y=Response, fill=Treatment))
a +
geom_bar(stat = 'identity', position = 'dodge')
I would not like to add at time 1 for all other treatments a "0", but I
would like to decrease only the bar width of treatment A at time 1 to the
same as the bar width of the other bars in the other 2 timepoints.
Is this possible in ggplot2?
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ***@googlegroups.com
To unsubscribe: email ggplot2+***@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.