Coder Social home page Coder Social logo

Comments (3)

laresbernardo avatar laresbernardo commented on August 28, 2024

Hi! This seems more of an issue trying to customize the ggplot object rather than using the library. Re the corr_cross() function, we apply theme_lares() by default to our plots so that all plot outputs have a consistent colour palette and theme. That said, once you have your object, you can customize the ggplot object to follow your style needs.

from lares.

NikitaEGroot avatar NikitaEGroot commented on August 28, 2024

Hi, thanks for your response!

I found a solution which I'll just share here in case anyone else wants to fiddle around with colours like I do - it ended up being really simple to just use the following (from https://rdrr.io/github/laresbernardo/lares/man/gg_fill_customs.html):

options("lares.colours.custom" = data.frame(
  values = c("positive", "negative"),
  fill = c("postivecolourthatIwanted", "negativecolourthatIwanted"),
  colour = c("black", "white")
))

With of course editing the the fill argument with whatever hex codes I desired. This had the added bonus of not producing any warnings like “Scale for ‘fill’ is already present. Adding another scale for ‘fill’, which will replace the existing scale.” You can do this for pretty much any colour in the theme depending on how that colour is retrieved - for corr_cross() I only needed positive and negative, but you can access the full list for true/false, different social media or the full palette etc with lares_pal(), all of which can be edited with variations of the code above.

Many thanks for building in these options for customisation!

from lares.

laresbernardo avatar laresbernardo commented on August 28, 2024

from lares.

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.