# Px.scatter() Animation: Help Making Y and X axis Ticks Evenly Spaced

**URL:** <https://community.plotly.com/t/px-scatter-animation-help-making-y-and-x-axis-ticks-evenly-spaced/43013>\
**Category:** 📊 Plotly Python\
**Created:** [July 27, 2020, 5:06pm UTC](https://community.plotly.com/t/px-scatter-animation-help-making-y-and-x-axis-ticks-evenly-spaced/43013 "2020-07-27T17:06:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cadbery](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@cadbery](https://community.plotly.com/u/cadbery)\
**Post date:** [July 27, 2020, 5:06pm UTC](https://community.plotly.com/t/px-scatter-animation-help-making-y-and-x-axis-ticks-evenly-spaced/43013/1 "2020-07-27T17:06:30Z")

</div>

I am having a problem with px.scatter() animation with getting the Y axis and X axis grid lines and ticks to have equal spacing. Below is my code, I can’t include the actual output so I drew a paint version demonstrating the general problem. The blue color lines indicate the disproportionate spacing in the grid lines. Though not marked, each line indicates a 1/10th step increment in the log (so between 10 and 100 there is 20, 30, 40, 50…), thus the grid lines should be evenly spaced.

fig = px.scatter(data, x=“xvar”, y=“yvar”, animation\_frame=frame, animation\_group=“group”,  
text=“group\_name”, color=“outcome\_2”, color\_continuous\_scale=[…] range\_color=[0,max\_setting],hover\_name=“group\_name”, size=“outocme\_3”, log\_y=True, log\_x=True, size\_max=55, **range\_x=[1,1.2\*data.xvarl.max()]**, **range\_y=[1,1.2\*data.yvar.max()**])

 ![spacing](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/5/549dd04063ef1fd18bc1c7d84a3a5e588740a57d.png)

The best that I can do is have the x and y ranges go from 1 to their max, but even this is not completely even and I would like to be able to zoom in more than just [1,max]. Any attempt to do range\_x=[100, max] creates a completely unacceptably unequal spacing between tick marks. Any advice would be appreciated!

Edits for formatting\*
