# Scatter plot x axes of different traces not mixed

**URL:** <https://community.plotly.com/t/scatter-plot-x-axes-of-different-traces-not-mixed/6690>\
**Category:** plotly.js\
**Created:** [November 7, 2017, 12:57pm UTC](https://community.plotly.com/t/scatter-plot-x-axes-of-different-traces-not-mixed/6690 "2017-11-07T12:57:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kausti](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kausti](https://community.plotly.com/u/kausti)\
**Post date:** [November 7, 2017, 12:57pm UTC](https://community.plotly.com/t/scatter-plot-x-axes-of-different-traces-not-mixed/6690/1 "2017-11-07T12:57:41Z")

</div>

My intended output is as follows  
[https://codepen.io/kausti/pen/QqqmOy](https://codepen.io/kausti/pen/QqqmOy)

The exact same code and data run on machine produces the following output

 ![scatter](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/8/8b3ade00f96fad3726e859268f56bc0e29da9b40.png)

As you see the xaxis data is messed up.  
Is it possible I am doing somethng wrong?  
As I said, the data and code is exactly same.  
I suspected first may be the numbers are passed as strings. But typeof confirms they are numbers.

I am using plotly 1.31.2  
Any ideas please?  
Thanks!

---

<div class="post-metadata">

**Author:** ![kausti](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kausti](https://community.plotly.com/u/kausti)\
**Post date:** [November 8, 2017, 8:18am UTC](https://community.plotly.com/t/scatter-plot-x-axes-of-different-traces-not-mixed/6690/2 "2017-11-08T08:18:12Z")

</div>

Ok, I have figured out the root of the problem but still do not understand the reason.  
Here is my layout. Nothing fancy. Basic stuff. This seems to be causing the problem. Because when I set layout = {} the problem is solved.  
I would like to know why this fails as I may have to make changes for other plots too. Thanks

```
const layout = {
  autosize: true ,
  xaxis: {showgrid: false,
			    tickfont: {
		        size: 10,
		        color: 'black'
		      },

	 },
	yaxis: {showgrid: false,
			    tickfont: {
		        size: 10,
		        color: 'black'
		      },

	 },
	titlefont: {size: 12},
	hovermode: 'closest',
  
}
```

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [November 13, 2017, 3:01pm UTC](https://community.plotly.com/t/scatter-plot-x-axes-of-different-traces-not-mixed/6690/3 "2017-11-13T15:01:13Z")

</div>

Can you share the `data/layout` attribute you used to generate the screenshot above to help us help you?
