Comments (4)
from lemon.
from lemon.
Hello @stefanedwards,
Thanks for your quick reply. Say I have the plot below created with this code:
# Creates Manhattan panel ~
Fst_Window <-
ggplot() +
geom_line(data = fulldfa, aes(x = gPoint, y = Fst, colour = Pops), linetype = 1, size = .6) +
facet_rep_grid(CHR ~. , scales = "free", repeat.tick.labels = "left", labeller = labeller(CHR = y_strip_labels)) +
scale_x_continuous("Genomic Position",
breaks = c(5000000, 10000000, 15000000, 20000000, 25000000, 30000000),
labels = c("5Mb", "10Mb", "15Mb", "20Mb", "25Mb", "30Mb"),
limits = c(0, 32000000),
expand = c(0, 0)) +
scale_y_continuous("Fst Across Chrmosomes",
breaks = c(.1, .3, .5),
labels = c("0.1", "0.3", "0.5"),
limits = c(0, .525),
expand = c(0, 0)) +
scale_colour_manual(values = c("#4daf4a", "#9970ab", "#f46d43")) +
theme(panel.background = element_rect(fill = "#ffffff"),
panel.border = element_blank(),
panel.grid.minor = element_blank(),
axis.line = element_line(colour = "#000000", size = .3),
axis.title.x = element_text(size = 20, face = "bold", color = "#000000", margin = margin(t = 30, r = 0, b = 0, l = 0)),
axis.title.y = element_text(size = 20, face = "bold", color = "#000000", margin = margin(t = 0, r = 30, b = 0, l = 0)),
axis.text = element_text(colour = "#000000", size = 15),
axis.ticks = element_line(color = "#000000", size = .3),
strip.background.y = element_rect(colour = "#000000", fill = "#d6d6d6", size = .3),
strip.text = element_text(colour = "#000000", size = 11.5, face = "bold"),
legend.position = "top",
legend.margin = margin(t = 0, b = 0, r = 0, l = 0),
legend.box.margin = margin(t = 30, b = 25, r = 0, l = 0),
legend.key = element_rect(fill = NA),
legend.background =element_blank()) +
guides(colour = "none", fill = "none")
I would like to have the ticks on the x-axis just once (very first x-axis down), and not on the repeated x-axis lines. So, the option would allow the user to control this behaviour. What do you think?
Thanks again, George.
from lemon.
Hej. Sorry for not making myself clear -- thanks for your explanation. I still do not think that what I am looking for is the default behaviour of facet_grid
. I was only brave to draw on 3 of them, but I hope you will get the idea. What I would like it to do is to repeat only the x-axis line, and not the x-axis line AND the x-axis ticks. So, the x-axis ticks and labels would appear only once (on the bottom panel ), while the x-axis line would be present in all panels. Does it make more sense now?
from lemon.
Related Issues (20)
- Legend for pointline is only point HOT 1
- geom_pointline distance = 0 removes the connecting lines entirely. HOT 1
- coord_flex_capped draws axis text to close to ticks HOT 1
- `reposition_legend()` places legend.box behind `facet_rep_grid()` HOT 1
- Change package emoji from tangerine to lemon 🍊➡ 🍋 HOT 2
- lemon print and rounding of values HOT 2
- `mintre` should be `mitre` HOT 1
- `coord_capped_cart()` reverts axis tick length adjustments HOT 1
- Axis line functionality broken in ggplot2 3.3.0 HOT 1
- Invalid line type in geom_pointpath HOT 1
- New grid version causes lemon_plot to fail
- `scales="free"` within `facet_rep_grid` does not make x-axis scales to be free HOT 5
- `facet_rep_grid` layout spacing issues with R 4.0.0 HOT 11
- Issue with next ggplot2 release HOT 4
- Error with coord_capped_cart: Error in `*tmp*`[[i]] : attempt to select less than one element in get1index HOT 1
- Issues with next version of ggplot2 HOT 3
- coord_capped_cart() throwing error after recent update HOT 1
- Repeating only x axis? HOT 1
- How to drop unused categories in x axis? 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 lemon.