Comments (1)
Hi there,
I'm happy you stumbled across my package (though its not quite finished/documented yet as you can see...).
The easiest way to add a theme would be to just define your own theme function that builds upon theme_prism()
. See the ggplot2 book or this blog post for more details.
Here is how I would do it (let me know if this helps):
library(ggplot2)
library(ggprism)
theme_new <- function(base_size = 14,
base_family = "sans",
base_fontface = "plain",
base_line_size = base_size / 14,
base_rect_size = base_size / 14,
axis_text_angle = 0,
border = FALSE) {
theme_prism(palette = "black_and_white",
base_size = base_size,
base_family = base_family,
base_fontface = base_fontface,
base_line_size = base_line_size,
base_rect_size = base_rect_size,
axis_text_angle = axis_text_angle,
border = border) %+replace%
theme(panel.background = element_rect(fill = "pink",
colour = NA),
axis.text = element_text(colour = "red"),
axis.title = element_text(face = "bold", colour = "orange"))
}
p <- ggplot(mtcars, aes(x = disp, y = mpg)) +
geom_point()
p + theme_prism() + labs(title = "theme_prism()")
p + theme_new() + labs(title = "theme_new()")
Created on 2020-12-13 by the reprex package (v0.3.0)
from ggprism.
Related Issues (17)
- To do before first release
- Integrate `latex2exp::TeX` into `add_pvalue`? HOT 4
- step.increase in add_y_position() is bad HOT 1
- Cant hide legend HOT 1
- adding scale_y_log10 changes y-axis to a weird range HOT 1
- Planned features
- Issues with next version of ggplot2 HOT 2
- Can't seem to adjust x-position for brackets in interaction plots with add_pvalue HOT 1
- Release ggprism 1.0.4
- Unable to display legend title HOT 2
- The `legend.text.align` theme element is not defined in the element hierarchy. HOT 6
- Release ggprism 1.0.1 HOT 1
- Release ggprism 1.0.2
- hide.NS option for add_pvalue function HOT 4
- Issue with the next release of ggplot2 HOT 1
- Release ggprism 1.0.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 ggprism.