srowley

srowley

GGity - another plotting library

Hello all,

I have been working on a charting library designed to support drawing SVG plots in Elixir using an API that is as close to ggplot2 as practical (you could call it a clone, but that would be an insult to the advanced stage of the science of cloning).

It currently supports point and line plots, but with a decent amount of options (bar charts are next). There are some examples in the README, and the project includes some mix tasks that generate several other examples. The README also explains in more detail my design goals and how GGity compares to the alternatives.

https://github.com/srowley/ggity

This is a personal project, but if anyone is interested in taking a look and offering feedback I would love to hear it.

Most Liked

srowley

srowley

Hi everyone - I just published version 0.4.

New features include:

  • LiveView support, via custom attributes - generate custom attributes for each shape on a plot. Those could be Phoenix event handlers, data bindings, Tailwind utility classes - it’s up to you. Attributes are created by passing a function that takes the plot and a row of data and returns a list of attributes to be attached to the shape representing that row on the plot
  • Boxplots - underappreciated in my view
  • Annotations - shortcut for adding a single text/line/rectangle element for including annotations on a plot
  • All of the ggplot2 point shapes (fillable and non-fillable) are available

The demo site has been updated with a simple LiveView example.

As always appreciate any feedback!

15
Post #3
josevalim

josevalim

Creator of Elixir

Hi @srowley, this looks great! As someone who has been looking into the R ecosystem lately, having something that is inspired by ggplot2 can be really helpful to welcome data science and ml folks that have familiarity with said tooling.

srowley

srowley

I have made enough progress to publish the latest version of GGity to Hex. This version implements ggplot’s layered approach to building up graphics; it also now supports bar charts, area/ribbon charts, data labels and custom themes.

I put together a demo here: GGity By Example. Thank you in advance for politely ignoring the Heroku free tier lag on first load.

Appreciate any feedback, and thanks to those whose forum responses have helped along the way!

Last Post!

srowley

srowley

Thanks for the kind words. I am a hobbyist and this is very much a hobby project, so I just kind of work on it when I have time, which has not been that often. Frankly I also recognize that the approach the community has taken with VegaLite is by far the more pragmatic and dependable, so I don’t feel like there is a desperate need for this. It’s just something I’m interested in and if others benefit from being aware of it that’s great.

I do have a roadmap but I don’t feel a huge obligation to follow it. Right now I think histograms should be next. Then I would like to do faceting but to do that right I will have to rework the general internal plot construction pipeline to more closely resemble what ggplot2 does, which could take awhile as I have only found bits and pieces explaining that (I can use R to do analysis but hardcore R programming is not strength I have, so reverse engineering is a challenge).

Where Next?

Popular in Announcing Top

wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 30380 241
New
devonestes
Introducing assertions, the library that helps you write really great test assertions! GitHub: GitHub - devonestes/assertions: Helpful a...
New
mathieuprog
Hello :waving_hand: Allow me to introduce you to Tz, an alternative time zone database support to Tzdata. Why another library? First a...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

We're in Beta

About us Mission Statement