Code Monkey home page Code Monkey logo

Comments (5)

const-ae avatar const-ae commented on June 8, 2024

Hi natsrm,
I am happy to hear that you like the package.
Unfortunately it is currently not possible to make the text bold. If you absolute need that, I guess the easiest way to achieve it would be to manually recreate the annotation using annotate(geom="text", ...) + geom_segment(...).

On the other hand the "correct" approach would be to extend ggsignif to support custom theme elements. Unfortunately I currently don't have the bandwith to implement this myself, so if you or anyone else ist interested, I would be happy to give pointers where to start and then merge a PR.

from ggsignif.

natsrm avatar natsrm commented on June 8, 2024

Thank you Constantin :) Yes I was previously using the annotate, but I have many plots and having to write everything by hand was a little annoying, which is why I appreciate the ggsignif package so much!

I would help on the enhancement if I could but I'm not really a pro at coding ahaha so thank you anyways! And I hope someone tries to implement it :)

Best,
Nats

from ggsignif.

davidmasp avatar davidmasp commented on June 8, 2024

I am not sure I understand the issue. Annotation should be the text or
pvalue on top of the segment right?

I think you can simply use fontface then. It’s already mapped.

see here.

library(magrittr)
library(ggplot2)

iris %>% ggplot(aes(x = Species,y = Sepal.Length)) + 
  geom_boxplot() +
  ggsignif::geom_signif(comparisons = list(c("virginica","versicolor")),
                        fontface = "bold")

iris %>% ggplot(aes(x = Species,y = Sepal.Length)) + 
  geom_boxplot() +
  ggsignif::geom_signif(comparisons = list(c("virginica","versicolor")),
                        annotation = "test",
                        fontface = "bold.italic")

Created on 2020-01-09 by the reprex package (v0.3.0)

from ggsignif.

natsrm avatar natsrm commented on June 8, 2024

Hey @davidmasp ,

You are right! I don't remember if I had tried to use fontface before, but I do feel quite dumb now ahaha. Thanks for the assist!

@const-ae given this, I guess the issue should be closed? Your call :)

from ggsignif.

const-ae avatar const-ae commented on June 8, 2024

@davidmasp, thanks for your input, that is a great solution. I didn't realize myself this was possible :D

from ggsignif.

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.