GithubHelp home page GithubHelp logo

Comments (5)

matthewstern avatar matthewstern commented on May 27, 2024

@dlcomeaux Now that #72 is merged, this should be an easy fix. I support reviewing theme_cmap and theme_cmap_base for hard coded values that should move to consts.

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

@dlcomeaux the more I work with examples, the more I think theme_cmap() might want to add an arg for adding tick marks. See the manual addition here, which requires both a change to the spacing and to the ticks.

from cmapplot.

dlcomeaux avatar dlcomeaux commented on May 27, 2024

Hmm, yeah, that seems reasonable, and shouldn't take too much work.

from cmapplot.

matthewstern avatar matthewstern commented on May 27, 2024

As I was re-making the Census graphic, I noticed that our current default setting for the margin between axis labels and the plot is 5 big points, which is significantly larger than the similar spacing in the comms-produced graphic. Also, that value (5) is hard-coded into theme_cmap(), which might be better served as an adjustable value in the overrides list.

Flagging here because I think this could also benefit from adding the same functionality for y-axis labels, in cases where the labels are on the side - currently, the margin for those is not manually adjusted, and remains at the default.

@dlcomeaux can you confirm that this is still an issue? in #67 at present I see that this margin is set to half_line / 2:

    axis.text.x =        element_text(margin = margin(t = consts$half_line / 2), vjust = 1),
    axis.text.x.top =    element_text(margin = margin(b = consts$half_line / 2), vjust = 0),
    axis.text.y =        element_text(margin = margin(r = consts$half_line / 2), hjust = 1),
    axis.text.y.right =  element_text(margin = margin(l = consts$half_line / 2), hjust = 0),

This should make the margin 3.5 pts (14 / 2 / 2), and not hard-coded. Unless I'm missing something?

from cmapplot.

dlcomeaux avatar dlcomeaux commented on May 27, 2024

@matthewstern this is correct, I submitted this issue before this change to the structure of the theme, if I'm recalling correctly. Going to close this and make a new issue about adding ticks as a possible enhancement.

from cmapplot.

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.