column plot with two x axes

34 views
Skip to first unread message

Héctor Meleiro

unread,
Mar 23, 2018, 11:11:09 AM3/23/18
to ggplot2
¿How can I achieve with ggplot the attached plot?
Captura de pantalla 2018-03-22 a las 20.02.20.png

Adriano Fantini

unread,
Mar 23, 2018, 11:42:56 AM3/23/18
to Héctor Meleiro, ggplot2
I think your best bet is to make two separate plots and unite then with package patchwork (or cowplot or similar) or one of those packages.

Adriano Fantini

2018-03-23 11:14 GMT+01:00 Héctor Meleiro <hmel...@gmail.com>:
¿How can I achieve with ggplot the attached plot?

--
--
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 ggp...@googlegroups.com
To unsubscribe: email ggplot2+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Héctor Meleiro

unread,
Mar 23, 2018, 12:11:31 PM3/23/18
to ggplot2
Yes, I finally got it using grid.arrange() from gridExtra library. You can see an example at the end of this script: https://github.com/meneos/R_Dataviz/edit/master/RENTABILIDAD%20INMUEBLES%20MADRID/rentabilidad_distritos.R

Thanks!

Theo Mouton

unread,
Mar 23, 2018, 4:13:43 PM3/23/18
to Héctor Meleiro, ggplot2

By googling « ggplot two-sided barplot » or « gglot two-way barplot » I found a number of questions and answers already asked on stack. Please provide a reproducible example if you have a specific question. 






Theo Mouton
Research Assistant
+64-7-859-1889 | Gate 10 Silverdale Road, Hillcrest, Hamilton | www.niwa.co.nz
NIWA
To ensure compliance with legal requirements and to maintain cyber security standards, NIWA's IT systems are subject to ongoing monitoring, activity logging and auditing. This monitoring and auditing service may be provided by third parties. Such third parties can access information transmitted to, processed by and stored on NIWA's IT systems.
--
--
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 ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@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+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages