Best plotting libraries?

I'm thinking of writing a plotting library (similar to e.g. matplotlib), that calls into an existing, established library (such as matplotlib), and I can use javascript, python, C/C++, or shell. I'm plotting datasets, not functions. I need to be able to plot 2D and 3D. Which libraries should I look at?

I guess I care about

  • feature set
  • how intuitive it is
  • how pretty the graphs are
  • that it's reasonably fast
8 points · 8 comments · view on lemmy.world

8 Comments

naught101@lemmy.world · 6 pts · 10d

Ggplot2 is by far the best conceptually and syntactically. It makes you think in terms of visual mappings, which is an incredible framework for understanding data viz.

Seaborn is a decent equivalent on python, but it's more constrained by how python operates (which is a good and bad thing, R is a wild language)

yaroto98@lemmy.world · 3 pts · 10d (1 reply)

jupyter notebook + python + matplotlib is what I think you're looking for.

staircase@programming.dev · 2 pts · 10d

I'm not looking for an environment (like, say, jupyter). Rather I'm writing something like maptplotlib, by wrapping something like maptplotlib in my own API

Terrapinjoe@lemmy.world · 3 pts · 10d (1 reply)

I don't know what that first line means, but I really like R studio for plots

staircase@programming.dev · 2 pts · 10d

updated. Any clearer now?

I don't think I can use R

kiwifoxtrot@lemmy.world · 1 pts · 10d

Plotly is pretty much all you need. It can create static plots like matplotlib, but it also has dynamic plus in which you can interact with your data, zoom in, rotate, etc. It is my favorite and I haven't come across anything better.

hayk@lemmy.ml · 1 pts · 22h (1 reply)

if you're writing your own API, I would recommend picking something very low level and established as a backend, otherwise limitations and thus hacky solutions will ruin it quickly. i'd say, there are several bottlenecks to consider before diving into any of options:

  • do you need latex?
  • how large of datasets are you planning to plot?
  • for 3d, do you need raytraced volume rendering, or will meshes be enough?

based on those, i'd recommend the following.

  1. drop c/c++ -- it's gonna be too much effort for too little advantage. there are no well-established and properly maintained plotting packages in c/c++ (implot comes close, but is very limited and often slow).
  2. if you need to run the library in a browser (webapp), look into d3js for frontend (i.e. building the axes, putting ticks etc), and a flask-based python server for backend (to actually read the data and produce the heaviest plots). if you need latex, just use katex on the frontend.
  3. for heavy data vis, look into python dask and datashader libraries.
  4. for 3d, there is really no good solution, but vtk is close. volume rendering though would be tough, i would recommend looking into ospray or other stuff like that.

let me know if you need any more details on any of the mentioned things.

staircase@programming.dev · 1 pts · 18h

jeez, that's a good answer. Thanks. I'd like to be flexible in size of dataset, though I don't know what I'll need yet. I expect I'll want latex. I don't know the difference between raytraced and mesh.