Comments (5)
In choroLayer()
you can set the number of decimals displayed in the legend with the legend.values.rnd
argument (set to 0 by default).
from cartography.
@rCarto thank you for the rapid response! Is there a way to set labels to the legend that DO NOT correspond to teh breaks?
For example, if I wanted to do (1,2,3,4,5,6) for each of (0,0.2,0.4,0.6,0.8,1)?
Best,
Jeff
from cartography.
Sure, you can use legendChoro()
:
library(cartography)
library(sf)
#> Linking to GEOS 3.5.1, GDAL 2.2.3, PROJ 4.9.3
mtq <- st_read(system.file("gpkg/mtq.gpkg", package="cartography"), quiet = T)
cols <- carto.pal("wine.pal", 6)
choroLayer(x = mtq, var = "MED", legend.pos = "n", col = cols)
legendChoro(pos = "topright", title.txt = "Legend title",
breaks = c(0,1,2,3,4,5,"max value"),
col = cols, nodata = FALSE)
Created on 2019-03-26 by the reprex package (v0.2.1)
from cartography.
@rCarto absolutely fantastic! For whatever reason your package is much more intuitive to me compared to others. Definitely going to recommend to coworkers and implement in work!
from cartography.
Thank you!
from cartography.
Related Issues (20)
- histogram legend HOT 5
- using 'custom' colors? HOT 1
- CRS issues HOT 5
- orphaned hole, cannot find containing polygon HOT 1
- Error in labelLayer when nrow(x) == 1 & overlap = FALSE HOT 1
- New features HOT 6
- Custom Tiles HOT 4
- missing corner case in cartography::getTiles HOT 1
- add more methods to getBreaks HOT 6
- Format legends on layers
- Bug on waffleLayer
- colored pencil maps with r by using HOT 3
- spikeLayer() ? HOT 2
- Facets HOT 2
- Symbols sizes in the legend.
- Add alpha channel to pngs HOT 1
- Can cartography create curved road labels, and loop base maps of different extents? HOT 3
- Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools** HOT 2
- Problème création carte Guadeloupe HOT 2
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 cartography.