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

alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 14361 106
New
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
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
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49134 226
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40082 209
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement