Comments (5)
Not really required, as can do everything other than colour palettes with:
set_theme()
weave_geom_aes()
weave_annotate_aes()
Colour palettes can be done with options()
from ggblanket.
library(tidyverse)
library(ggblanket)
library(palmerpenguins)
set_blanket()
ggblanket:::set_ggplot()
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = species,
)
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).
penguins |>
ggplot() +
geom_point(aes(x = flipper_length_mm, y = body_mass_g, colour = species))
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).
Created on 2024-04-18 with reprex v2.1.0
from ggblanket.
library(tidyverse)
library(ggblanket)
library(palmerpenguins)
set_blanket()
ggblanket:::set_ggplot(dark_mode_r())
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = species,
)
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).
penguins |>
ggplot() +
geom_point(aes(x = flipper_length_mm, y = body_mass_g, colour = species))
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_point()`).
Created on 2024-04-18 with reprex v2.1.0
from ggblanket.
Merge with set_blanket - because weave_geom_aes and weave_annotate_aes affect ggplot2 anyway.. Then might as well make it all affect ggplot2
from ggblanket.
library(tidyverse)
library(ggblanket)
library(palmerpenguins)
weave_mode(new = dark_mode_r())
weave_geom_aes(colour = pink)
weave_annotate_aes(colour = darkness[2])
weave_col_palette(discrete = c(pink, blue, navy),
continuous = viridis::rocket(n = 20))
weave_theme(new = dark_mode_r(orientation = "x"))
# set_blanket(
# mode = dark_mode_r(),
# geom_colour = pink,
# annotate_colour = darkness[2],
# col_palette_discrete = c(pink, blue, navy),
# col_palette_continuous = viridis::rocket(n = 20),
# theme = dark_mode_r(orientation = "x"),
# )
penguins |>
gg_histogram(
x = flipper_length_mm,
col = species,
x_title = "Flipper length (mm)",
) +
geom_vline(xintercept = 200)
penguins |>
ggplot() +
geom_histogram(aes(x = flipper_length_mm,
col = species,
fill = species,
)
) +
geom_vline(xintercept = 200) +
scale_y_continuous(expand = c(0, 0),
breaks = scales::breaks_pretty(6),
# limits = c(0, 30)
) +
labs(x = "Flipper length (mm)",
y = "Count",
colour ="Species",
fill = "Species")
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
col = bill_depth_mm,
x_title = "Flipper length (mm)",
) +
geom_vline(xintercept = 200)
penguins |>
ggplot() +
geom_point(aes(x = flipper_length_mm,
y = body_mass_g,
col = bill_depth_mm,
fill = bill_depth_mm,
)
) +
geom_vline(xintercept = 200) +
scale_y_continuous(expand = c(0, 0),
breaks = scales::breaks_pretty(6),
# limits = c(0, 30)
) +
labs(x = "Flipper length (mm)",
y = "Count",
colour ="Species",
fill = "Species")
penguins |>
gg_point(
x = flipper_length_mm,
y = body_mass_g,
x_title = "Flipper length (mm)",
) +
geom_vline(xintercept = 200)
penguins |>
ggplot() +
geom_point(aes(x = flipper_length_mm,
y = body_mass_g,
)
) +
geom_vline(xintercept = 200) +
scale_y_continuous(expand = c(0, 0),
breaks = scales::breaks_pretty(6),
# limits = c(0, 30)
) +
labs(x = "Flipper length (mm)",
y = "Count",
colour ="Species",
fill = "Species")
from ggblanket.
Related Issues (20)
- Colour: make hex codes caps
- code makes the base plot twice uneccesarily!
- set_blanket: add variants HOT 2
- design: force all optional args to be named HOT 2
- docs: use `position_dodge2(preserve = "single")` HOT 1
- aes_contrast: remove mode_family argument
- ness helpers are not well named HOT 2
- Bug: in colouring with when `col_palette_d` was set with names not in the data HOT 1
- set_blanket: non-named values in col scales does not work where there are named values in set col_palette_d HOT 1
- docs: update vignette multiple layers example HOT 1
- rug breaks with DEV ggplot2
- stat bin changes with DEV ggplot2
- *_limits: consider removing from x/y HOT 3
- *_breaks` & `y_limits`: where both set, breaks does not work
- x-scale not working great in the below example HOT 1
- consider shifting default back to grey (and facet shift as well) HOT 1
- positional scales: remove `*_limits`, `*_oob` and `*_expand` HOT 1
- positional scales: make symmetric scale even if *_expand is not NULL
- positional scales: remove `*_transform`
- positional scales: could make symmetric if limits specified by dividing into equal parts
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 ggblanket.