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
you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 1 month ago (1 child)

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.

  • source
  • hideshow 1 child comment
  • [–] [S] 1 point 1 month ago* (last edited 1 month ago)

    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.

    1. Really useful to know c/c++ is a no-go.
    2. Do I want to support browser? Don't know yet
    3. I'm surprised you say there's no good 3D. I believed plotly was fine for 3D. Maybe we're talking about different levels of 3D

    I would like to stick to one language - python or js but not both

  • source
  • parent