hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
12.62k stars 669 forks source link

Unable to customize AxisScale #2333

Open wellcoming opened 1 month ago

wellcoming commented 1 month ago

Is your feature request related to a problem? Please describe. I am trying to use custom axis scales (e.g., square root scale) in Dear PyGui. This feature was added in ImPlot v0.14 with the function SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse, void* data=NULL), which allows for user-supplied forward and inverse transforms for custom axis scales. However, the main branch of Dear PyGui currently uses ImPlot v0.11, and the available functionality only supports log and time scales through log_scale and time. PR #2275 is attempting to upgrade ImPlot and includes predefined scales, but the capability to use custom transforms does not seem to be available.

Describe the solution you'd like I would like to have the ability to define custom axis scales in Dear PyGui by allowing users to pass custom forward and inverse transform functions to the SetupAxisScale function, similar to what is available in ImPlot v0.14. This would enable users to implement scales such as square root scales, logarithmic scales, and other non-linear transformations.

Describe alternatives you've considered I haven't been able to think of an effective alternative solution to this issue. Native support for custom axis scales would be the most straightforward and user-friendly approach.

Additional context Here is the relevant function signature from ImPlot v0.14:

// Sets an axis' scale using user supplied forward and inverse transforms.
void SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse, void* data=NULL);

I hope someone can assist with this feature request. Thank you for your consideration and all your hard work on this project!