Giter VIP home page Giter VIP logo

Comments (5)

eliocamp avatar eliocamp commented on August 11, 2024 2

I don't know why I didn't see it, but I think the issue is that using guides() doesn't work with ggnewscale. You need to specify the guide in the guide argument of the scale.

This should work:

 scale_fill_gradient2(low = "#f0f0f0", mid = "#969696", high = "#252525", midpoint = 21, n.breaks = 5, 
                      guide = guide_colourbar(title = "Salinity", title.theme = element_text(size = 16, face = "bold"),
                                   label.theme = element_text(size = 14, face = "bold"), label.position = "top",
                                   barwidth = 10.7, barheight = 1, order = 1, frame.linetype = 1, frame.colour = "#000000",
                                   ticks.colour = "#000000", direction = "horizontal")))

If you're still having trouble, please send a minimal reproducible example so I can troubleshoot the issue.

from ggnewscale.

twest820 avatar twest820 commented on August 11, 2024 1

Just hit this and can confirm the above workaround as moving guides(fill = guide_colorbar()) into scale_fill cleared the issue for me.

from ggnewscale.

jan-glx avatar jan-glx commented on August 11, 2024

I believe this will be fixed by #53 (can be used today by using remotes::install_github("teunbrand/ggnewscale", ref = "guide_fix")

from ggnewscale.

eliocamp avatar eliocamp commented on August 11, 2024

Thanks. #53 is now merged. Please do confirm if this fixes the issue :)

from ggnewscale.

MartinBeal avatar MartinBeal commented on August 11, 2024

Still happens for me with v.0.4.9.

from ggnewscale.

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.