Comments (3)
Please make up a simplified example of the issue and post reproducible code for it. Thanks!
from cowplot.
Thanks for your attention, Claus.
library(ggplot2)
library(cowplot)
plots = list()
for (plotnum in 1:30) {
tempdf = data.frame(xtemp = rnorm(20), ytemp = rnorm(20))
plots[[plotnum]] = ggplot(tempdf, aes(x=xtemp, y=ytemp)) + geom_point() + ylab(paste("Plot",plotnum)) + theme_bw() +
theme(axis.title.x = element_blank(), axis.text.x = element_blank(), axis.title.y = element_text(size = 6))
}
tempplot = do.call("plot_grid", c(plots, ncol=3, align = "hv"))
ggsave("example.pdf", tempplot, height = 9, width = 6.5, units = "in")
from cowplot.
You can eliminate the margins from the y-axis title via:
axis.title.y = element_text(size = 6, margin = margin(t = 0, r = 0, b = 0, l = 0, unit = "pt"))
This moves the titles as close to the axis-tick labels as possible, see e.g. Plot 4:
Of course there's still a distance in the other plots, since the y-axis titles are all aligned. I think you would want them to be.
from cowplot.
Related Issues (20)
- feature request: geom_image that allows plotting of several images, based on geom_rect? HOT 12
- align by axis values HOT 1
- Conversion failure warnings on unicode character HOT 3
- Label positioning is inconsistent HOT 1
- Rstudio crashed on iOS saving plots into tiff format HOT 6
- [Feature request] Icicle plot with ggplots objects
- Using expressions in plot text generates warnings
- Feature request: Add "units" parameter to all functions where size can be specified.
- Odd problem with setting alpha in an annotate geom
- [Feature request] Align legend with the start and end of the axis
- Cannot convert object of class LayerInstanceLayerggprotogg into a grob?
- changing size of the second plot in plot_grid() HOT 2
- ggarange common.legend positioning overwritten
- No side effect from plot_grid when used inside a function returning an object
- get_legend doesn't match original position
- Blank plot using plot_grid with RNotebook
- Feature request: options for anchors of labels in plot_grid HOT 1
- warning message: The `size` argument of `element_line()` is deprecated as of ggplot2 3.4.0. HOT 5
- Explanation of how align_plot, ggdraw, and draw_plot work together for dual-y-axis plots.
- `draw_image` only works when background themes are set to `ggplot2::element_blank()` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cowplot.