Comments (10)
Just a note: everything should be exported in SVG format for Comms, as that is easiest for them to edit in Illustrator.
from cmapplot.
do we want the ability to export in jpg and pdf as well, for more immediate uses that don't involve further tweaking by comms?
from cmapplot.
I imagine this would be useful, although PNG (or GIF) should be used instead of JPG, which is good for photos but not graphics. I think an output_format
parameter for the function, with a default of "svg"
would be a good way to implement this, so that if not explicitly specified then an SVG will be exported.
from cmapplot.
Once we get the font situation figured out, it would be cool if this function issued a warning if the correct fonts were not being used.
from cmapplot.
@sarahcmap, not sure this was 100% clear from our meeting yesterday: In terms of final chart layout, our direction at this point is to combine the "designer guidelines" from the link in the first post of this issue with a graphic from a recent policy update, for example here. The current model has the title, source, and note on the left and the legend above. Nancy will supposedly be updating the designer guidelines soon with the new design, but if that doesn't come down the pipe soon it's probably worth going to chat with her.
Also, where do we want to go with the larger question of what goes in theme_cmap
and what goes in finalize_plot
? It seems like some aspects are really clearly in this project (e.g. file format, dimensions, etc) but things like font size, legend placement, etc are maybe undetermined at this point. Might be worth sitting down with @MMenninger before going too deep?
from cmapplot.
Thanks for the additional details Matt - I'm still just getting started but I'll touch base with Martin/Nancy as needed!
from cmapplot.
Be forewarned that if we add a PDF-exporting option, we will probably run into issues with the fonts. See this StackOverflow Q&A for more info.
from cmapplot.
- Width of sidebar as argument – percentage?
- Auto-breaking title and note/source text (in progress)
- Space between title and subtitle/note
- Letting of title and note/source text (see details from Nancy in post below)
- Strong (2 point) horizontal line across top (in progress)
- note: this line seems thicker than 2 points...setting to 3 for now (can research units more)
- Four output options (based on best practices document):
- Default = Indesign (note: font sizes inherited from theme)
- Web = Web
- Report = Word
- Presentation = Powerpoint
- Multiple output modes:
- View in R (use Window function so width is specified?)
- SVG
- PNG
- PDF (note font challenges, see Noel's comment above)
from cmapplot.
Specs from Nancy:
graph area
- Space for graph title/note/source: 2.1503 in --> 154.8 px/23.3% of plot area. setting to 23% (adjustable) with width=670.
- Space between the title and graph: 0.16 in --> 11.5px/1.7% of plot area. setting to 2% (not adjustable for now) with width=670.
- Graph: 6.921 in --> 664 px/75% of plot area. setting based on graph title/note/source pct
other
- line on top of title/graph: .0277 in --> this is about right with line weight of 3 at y=0.92
- leading for Title: 19pt --> this is slightly less than the default leading for 17pt font (according to Adobe illustrator). set to appropriate ratio = 0.93. the lineheight argument in gpar seems to consider lineheight of 1 as being the lineheight with the default leading (so it will be larger than the actual font size)
- leading for Note/Source: 13.2pt --> this is the default leading for 11pt font (according to Adobe Illustrator)
from cmapplot.
some links on grob management for safe keeping:
- https://cran.r-project.org/web/packages/gridExtra/vignettes/arrangeGrob.html
- https://stackoverflow.com/questions/59012782/ggplot2-how-to-align-grobs-to-sides-using-arrangegrob
- https://genviz.org/module-07-appendix/0007/01/01/advancedggplot2/
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.