Comments (5)
@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.
@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.
Hmm, yeah, that seems reasonable, and shouldn't take too much work.
from cmapplot.
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 theoverrides
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.
@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)
- Allow capitalized race designations for cmap_[fill/color]_race HOT 8
- v1.2 font handling and output goals HOT 16
- Margins image is not displaying in vignettes HOT 3
- Implementing svglite
- small documentation bug related to viz_palette and viz_gradient
- Add map layout function HOT 3
- Follow up with Comms about discrete color scales HOT 3
- vignette build fails on install HOT 2
- double caption in finalize HOT 2
- Remove unused race/ethnicity categories from legend
- deactivate top line HOT 2
- Address deprecation of save-state and set-output HOT 2
- Margins image not showing in documentation
- Prevent palette interpolation for some cases HOT 2
- Adding Superscript (or any Latex/formula formatting) to the title or caption in finalize_plot() HOT 1
- Update_recessions - being able to show only certain recession bands
- COVID Band
- Digital Accessibility - Color Palettes and more HOT 1
- Geom_text_lastonly() - can't adjust position HOT 1
- Adding more recent dummy data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmapplot.