plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
16.3k stars 2.55k forks source link

enable setting `xtick` to Integers Only #4697

Open RoyiAvital opened 3 months ago

RoyiAvital commented 3 months ago

It would be great both to have auto mode for the xticks yet being able to set them to be integer values only.

One could set them manually but them the auto scaling is gone. Yet in some cases one would like to have only integers. Yet setting the format to d might yield the same value number of time (1, 1.25, 1.5, 1.75, 2 will be mapped to 1, 1, 1, 2, 2 while one would like to have only 1 and 2 [Or others yet with auto range on]).