epezent / epezent/implot

Axis change detection / caching?

Open
#314 4 comments 0 reactions 0 assignees View on GitHub
type:feat
Dominant language
C++
Stars
6.2k
Forks
693
PR merge metrics
No merged PRs in 30d

Description

I have a data set I want to scatter plot, but a lot of the data points are redundant in the sense that many of them are so close together in plot space that they end up occupying the same pixel in screen space. This means a lot of redundant useless rendering is going on, so I attempted to write some code to preprocess my data that would remove all of the redundant points that would go to the same pixel.

With `ImPlot::PlotToPixels` it's possible to write the code that will generate the new data set. I make a bitset with 1 bit per pixel, iterate all my data points converting them to pixel coordinates, and if the associated bit is not set set it and add the point to my data set. That works dandy.

The problem is in figuring out when I need to rerun the processing step. Because I control the generation of the original data set I know when it changes already, but as far as I can tell the API gives me no easy way to check when the axes change. I can get the limits of each axis and the pixel size and make sure that hasn't changed but I can't tell if log scale, opposite, or any of the other axis options have been toggled. `ImPlot::PlotToPixels` appears to use `ImPlotAxis` objects that I could compare for changes, but this type is fully hidden inside `implot.cpp`.

Is there a recommended away to do this?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.