r - Conflict between multiple uses of inset_element and function plot_annotation - Stack Overflow
A situation was encountered when merging subgraphs in using patchwork
. It is necessary to use inset_element
to merge multiple times and then label at the end. But in the case of labeling the following problem occurs: the diagram that was inset_element the second time is missing the annotation. does anyone know why? Does anyone know how to solve this problem?
library(ggplot2)
p1 <- ggplot(mtcars) +
geom_point(aes(mpg, disp)) +
ggtitle('Plot 1')
p2 <- ggplot(mtcars) +
geom_boxplot(aes(gear, disp, group = gear)) +
ggtitle('Plot 2')
p3 <- ggplot(mtcars) +
geom_point(aes(hp, wt, colour = mpg)) +
ggtitle('Plot 3')
p4 <- ggplot(mtcars) +
geom_bar(aes(gear)) +
facet_wrap(~cyl) +
ggtitle('Plot 4')
p1n <- p1 + inset_element(
p4,
left = 0.05,
bottom = 0.05,
right = 0.25,
top = 0.25,
ignore_tag = TRUE)
p2n <- p2 + inset_element(
p4,
left = 0.05,
bottom = 0.05,
right = 0.25,
top = 0.25,
ignore_tag = TRUE)
patchwork <- (p1n + p2n) / p3
patchwork + plot_annotation(tag_levels = 'A')
最新文章
- 有点厉害 win10兼容安卓应用方式曝光
- 导航APP软件免费“醉翁之意不在酒”
- The uid generator is giving negative value(-8201645565344219221) and using this implementation DefaultUidGenerator.java to gener
- Why is my openGL render failing, Python OpenGL - Stack Overflow
- machine learning - Cannot import name 'T2TViTModel' from 'transformers' - Stack Overflow
- circom - Pedersen Commitment Homomorphic Addition Issue - Stack Overflow
- wordpress - Give access to users own submitted entries only wpforms - Stack Overflow
- Supabase - new row violates row-level security policy - Stack Overflow
- laravel - Customizing Fortify for Multi-Tenant Password Resets Tokens with Domain-Specific Tokens - Stack Overflow
- flutter - Retrieving tokens from aad_b2c_webview - Stack Overflow
- How to list ALL Zoom cloud recordings? - Stack Overflow
- reactjs - How to deploy Laravel (with react) app on heroku without any error (like 419 error) - Stack Overflow
- node.js - How to handle time taking processes in slack app view - Stack Overflow
- ESP32 Bluetooth - Is it possible to keep Provisioning Manager Bluetooth Up, After Provisioning Is Done? - Stack Overflow
- php - 406 error when sendingreceiving JSON data - Stack Overflow
- python - Call function from macos framework (e.g. IntelPowerGadget) - Stack Overflow
- swift - Popovers not displayed inside ForEach over Enum types - Stack Overflow