delabj / ggcyberpunk Goto Github PK
View Code? Open in Web Editor NEWA "Geom" for creating charts with a cyberpunk aesthetic
License: Other
A "Geom" for creating charts with a cyberpunk aesthetic
License: Other
Right now the aes() can only be defined in ggplot() due to how I've defined the function. This could be improved, but I'm unsure of the best way to approach this.
As seen in #11 the showtext package isn't supported. I think this is likely due to me having written this package with extrafont in mind. I'm not sure if the bug is from my code or from ggplots code.
I think this might be fixed if I load from showtext directly instead of relying on extrafont which did cause some issues with OS specific bugs.
Based on the description in #11 there are a few issues with my documentation/examples.
One goal I have to improve this package is to get away from the current pseudo-geoms. by creating either a new stat or geom. If possible I want to avoid breaking existing set ups but they're implemented in fairly clunky manner.
(I'm looping geoms over and over with different widths/sizes and alpha levels.)
I've found a few examples of other packages that do similar things with different implementations.
{ggecho} is an experimental package that seems to be implementing the effect in a manner that I prefer, by creating an underlying stat that is doing all the work.
{elementalist} is another package that's been shared with me that has a similar effect. This is implemented using the theme()
options it adds, which I'm not sure how effective this would be for {ggcyberpunk}
Both of these seem to solve the issue I had where the glowing effect on intersections of lines looks a little odd due to the layering. (don't look to closely unless you never want to unsee it).
I'm looking for any other examples of this effect done in ggplot to see if there's a better solution.
It might be a good idea to add some wrapper functions to give the plots something that feels like the matplotlib style of plotting or base R.
This isn't a high priority for me, since I tend to not like having the inner workings hidden from the user and enjoy the flexibility that exposing that brings with it. However, I know packages like Thomas Neitmann's {ggcharts} are fairly popular as are the qplot functions in {ggplot2}
R CODER on twitter shared a project today that is providing individual plot functions and perhaps something could come from that.
Hello,
I am testing out your pkg and really like it, thanks for making it.
My issues are:
Aldrich
font is not loaded and gave me 50 warnings but was fixed once i loaded showtext
pkglibrary(showtext)
font_add_google(family = 'Aldrich', 'Aldrich')
showtext_auto()
scale_color_linesaber(reverse = T)
i get an error saying that this function can't be found and when i check for it with ggCyberPunk::
it is not there.# this fails to work for function "scale_color_linesaber"
df2 %>%
ggplot(aes(x=Time, y = count, color = group, fill= group))+
geom_linesaber(alpha = 1, size = 1, glow_alpha = 0.03)+
# ggCyberPunk::geom_linesaber()+
theme_cyberpunk()+
scale_color_linesaber(reverse = T)+
ggtitle("geom_linesaber()", subtitle = "From ggCyberPunk")
this works
df2 %>%
ggplot(aes(x=Time, y = count, color = group, fill= group))+
geom_linesaber(alpha = 1, size = 1, glow_alpha = 0.03)+
ggCyberPunk::geom_linesaber()+
theme_cyberpunk()+
# scale_color_linesaber(reverse = T)+
ggtitle("geom_linesaber()", subtitle = "From ggCyberPunk")
theme_delabj_dark()
function with error could not find function "theme_delabj_dark"
but works when i use ggdark::dark_mode()
this works
df3 %>%
ggplot(aes(x=I, y = count, color = group, fill= group))+
geom_glowing_area(glow_size = .5, glow_alpha = 0.05,layers = 10)+
# theme_delabj_dark()+
ggdark::dark_mode()+
scale_fill_manual(values = c("#08F7FE", "#FE53BB"))+
scale_color_manual(values = c("#08F7FE", "#FE53BB"))+
labs(title = "geom_glowing_area")
It would be nice to extend this aesthetic to a few of the other basic geoms. These can be accomplished in a similar manner to those already implemented.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.