You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Axis formatting by converting exponential numbers to normal numbers #304
I am trying to reproduce the original python matplotlib functionality of being able to display fixed offsets in x, y, and z values in the chart axes to whole numbers. This question on stackoverflow, very well explains what I intend to do.
I have some representative Python code which does the job for me in matplotlib (Python). The following is the code:
Thanks for the detailed question! Controlling the offset and scientific notation fits the project. pyplot has ticklabel_format, which acts on the current axes (including the z axis of 3D plots), so a plt::ticklabel_format(const std::map<std::string, std::string>& keywords = {}) wrapper forwarding keywords such as axis, style and useOffset would cover this. A PR that follows the existing conventions (keywords forwarded as kwargs, throw on failure like title or xlabel) plus a small example would be welcome. Keyword values arrive in Python as strings, so useOffset needs to be converted to a real boolean rather than passed as "False". Until then, master already lets you switch the offset off globally: plt::rcparams({{"axes.formatter.useoffset", "False"}}); before plotting.
🤖 This triage was made by the project's automated governance process. See the README for details.
Activity
lava commentedon Nov 4, 2026
Thanks for the detailed question! Controlling the offset and scientific notation fits the project. pyplot has
ticklabel_format, which acts on the current axes (including the z axis of 3D plots), so aplt::ticklabel_format(const std::map<std::string, std::string>& keywords = {})wrapper forwarding keywords such asaxis,styleanduseOffsetwould cover this. A PR that follows the existing conventions (keywords forwarded as kwargs, throw on failure liketitleorxlabel) plus a small example would be welcome. Keyword values arrive in Python as strings, souseOffsetneeds to be converted to a real boolean rather than passed as"False". Until then, master already lets you switch the offset off globally:plt::rcparams({{"axes.formatter.useoffset", "False"}});before plotting.🤖 This triage was made by the project's automated governance process. See the README for details.