Comments (2)
Thanks, I will look into this! You have control over the font using myTheme[["family"]]
and myTheme[["face"]]
, but currently not over the text size. As a quick temporary fix: The size of the text that you see depends on the dimensions of the exported figure and the quality (dpi
). The map can be saved/exported in the recommended size and quality by calling:
ggplot2::ggsave(filename = "plot.png", plot = p, height = 500, width = 500, units = "mm", dpi = 100)
Or by providing cityview()
with a filename directly, as is shown in the readme, like so:
myTheme <- list(
colors = list(
background = "#232323",
water = NA,
landuse = NA,
contours = NA,
streets = "#FF8200",
rails = c("#FF8200", "#232323"),
buildings = NA,
text = "#ffffff",
waterlines = NA
),
font = list(
family = "serif",
face = "bold",
append = "\u2014"
),
size = list(
borders = list(
contours = 0.3,
water = 0.4,
canal = 0.5,
river = 0.6
),
streets = list(
path = 0.2,
residential = 0.4,
structure = 0.5,
tertiary = 0.7,
secondary = 0.8,
primary = 0.9,
motorway = 1,
rails = 0.75,
runway = 3
)
)
)
cityview(name = "Knoxville", zoom = 0.5, theme = myTheme, filename = "plot.png")
This code gives:
from rcityviews.
You can now use myTheme[["font"]][["scale"]]
to set the scaling factor for the font. Below is an example with scale = 0.5
.
myTheme <- list(
colors = list(
background = "#232323",
water = NA,
landuse = NA,
contours = NA,
streets = "#FF8200",
rails = c("#FF8200", "#232323"),
buildings = NA,
text = "#ffffff",
waterlines = NA
),
font = list(
family = "serif",
face = "bold",
scale = 0.5,
append = "\u2014"
),
size = list(
borders = list(
contours = 0.3,
water = 0.4,
canal = 0.5,
river = 0.6
),
streets = list(
path = 0.2,
residential = 0.4,
structure = 0.5,
tertiary = 0.7,
secondary = 0.8,
primary = 0.9,
motorway = 1,
rails = 0.75,
runway = 3
)
)
)
cityview(name = "Knoxville", zoom = 0.5, theme = myTheme, filename = "plot.png")
Hope that helps!
from rcityviews.
Related Issues (19)
- Generated images lack osm attribution HOT 1
- [Feature] Specify both city and country HOT 1
- Cannot map Tokyo HOT 3
- [Feature] Way to obtain/save data only so it's quicker and more effective to try out different plot styles afterward HOT 1
- [Feature] change pre-specified themes HOT 2
- "Error : node stack overflow" when downloading data HOT 4
- [Feature] Change Overpass API server HOT 2
- [Bug] Error when asking local Overpass API server HOT 2
- [Question] Meaning of defaultRadius HOT 4
- Disable certain type of buildings (or other OSM features) HOT 4
- [Feature] I would like to be able to select cities by lat/long, or by city & country HOT 2
- [Question] HOT 3
- HTTP 504 - Gateway Timeout HOT 3
- Error In Installation HOT 3
- Error in installation HOT 5
- Choose cities or towns or areas by coordinates HOT 3
- Installation error HOT 1
- git history is huge HOT 3
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 rcityviews.