I have a really odd behavior I’m seeing with plotly. I have a decently large data set that I’m trying to graph. The dataset is a JSON I query and then loop through and add to an array:
for (var i = 0; i < (data.length); i++) {
x_arr.push(data[i].LocalDatetime);
temp2.push(data[i].temp2)
}
The array is then fed into:
var trace_temp2 = {
x: x_arr,
y: temp2,
mode: 'lines',
name: 'temp2'
};
var dataTemperatures = [ trace_temp1 , trace_temp2 , trace_temp3 , …]
var layout = {};
Plotly.newPlot(‘myDivTemperature’, dataTemperatures, layout);
The results look like the following zommed in:
As you can see the Y axis is out of order for random values and my trace_temp2 jumps up on the y axis to a smaller number. I thought it might be the datetime timestamp, but I’m pretty sure is isn’t. In fact if I plot this trace_temp2 alone it plots perfectly!
Any ideas why it plots perfectly alone, but not with other traces on the same plot?
Edit: One thing I noticed is this behavior occurs for a certain range of values: