Git Product home page Git Product logo

Comments (4)

stefanedwards avatar stefanedwards commented on May 24, 2024 1

from lemon.

stefanedwards avatar stefanedwards commented on May 24, 2024 1

from lemon.

g-pacheco avatar g-pacheco commented on May 24, 2024

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.

BSG_EuropeanFlounder--Fst-Windows-NoStepping_Lines_BalticSea

from lemon.

g-pacheco avatar g-pacheco commented on May 24, 2024

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?

InkedBSG_EuropeanFlounder--Fst-Windows-NoStepping_Lines_BalticSea_LI

from lemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.