Henry Francisco Soria-Díaz
2018-08-20 02:08:23 UTC
Hello,
I would like to know how I can make a double-axis bar graph (x, y, y1) with
different scales with the purpose of comparing a suppository value (Price
per year) and a real value (Price per year) of each categorical variable
(type=Tipo). That is, how to add a secondary axis (y1 = Valor_Carbon):
Tipo Valor_SIMB Valor_Carbon
1 SEMMAS 1.452.400 2.120.087,1
2 SEMTEC 24.028 25.285,1
3 DA_ONÃA 3.105 138.373,4
... ........... ...... .....
For example: p <- ggplot (daa, aes (x = Tipo, y = Value_SIMB, fill = Tipo))
+ geom_bar (stat = "identity")
p
[image: exemplo1.jpg] <about:invalid#zClosurez>
I can not add the second value (y1 = Valor_Carbon) in the graph, but with a
different scale. Also, how can I sort the values in ascending order
(2000-1600000) on the "Y" axis, and how could I correct the names of the
labels and the legend so that they are more visible and coherent?
I will be grateful for your help and kindness.
Sincerely,
Henry
--
--
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 would like to know how I can make a double-axis bar graph (x, y, y1) with
different scales with the purpose of comparing a suppository value (Price
per year) and a real value (Price per year) of each categorical variable
(type=Tipo). That is, how to add a secondary axis (y1 = Valor_Carbon):
Tipo Valor_SIMB Valor_Carbon
1 SEMMAS 1.452.400 2.120.087,1
2 SEMTEC 24.028 25.285,1
3 DA_ONÃA 3.105 138.373,4
... ........... ...... .....
For example: p <- ggplot (daa, aes (x = Tipo, y = Value_SIMB, fill = Tipo))
+ geom_bar (stat = "identity")
p
[image: exemplo1.jpg] <about:invalid#zClosurez>
I can not add the second value (y1 = Valor_Carbon) in the graph, but with a
different scale. Also, how can I sort the values in ascending order
(2000-1600000) on the "Y" axis, and how could I correct the names of the
labels and the legend so that they are more visible and coherent?
I will be grateful for your help and kindness.
Sincerely,
Henry
--
--
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.