Why the scatter plot is plotting zero data points when the data has no zero values
Question:
I want to plot a scatter plot between ambienttemp and lightintensity. Based on the distribution for light intensity, there is no zero values, the min value is 10.
enter image description here
But my scatter plot is plotting zero or values less than zero
enter image description here
Here is my code
xs = df_combinedAL['AmbientTemp'].values
ys = df_combinedAL['LightIntensity'].values
plt.figure(figsize=(12,10))
plt.scatter(xs,ys,alpha=0.6)
plt.xlabel('AmbientTemp')
plt.ylabel('LightIntensity')
plt.title('Relationship between LightIntensity and AmbientTemp')
Thanks in advance if someone can answer me.
Answers:
They are not plotting below 0. It just looks like it as a big circle is used to represent the point. Additionally, your scale for the y-axis is giant, so your minimum value, which is 10
basically looks like it’s on 0
.
It seems a scale problem. The plot contains 10.000 points and it actually seems that there are points in 0 because the dimensions of the points is bigger than the scale of the axis, but if you zoom in you can note that there are no points in 0.
I want to plot a scatter plot between ambienttemp and lightintensity. Based on the distribution for light intensity, there is no zero values, the min value is 10.
enter image description here
But my scatter plot is plotting zero or values less than zero
enter image description here
Here is my code
xs = df_combinedAL['AmbientTemp'].values
ys = df_combinedAL['LightIntensity'].values
plt.figure(figsize=(12,10))
plt.scatter(xs,ys,alpha=0.6)
plt.xlabel('AmbientTemp')
plt.ylabel('LightIntensity')
plt.title('Relationship between LightIntensity and AmbientTemp')
Thanks in advance if someone can answer me.
They are not plotting below 0. It just looks like it as a big circle is used to represent the point. Additionally, your scale for the y-axis is giant, so your minimum value, which is 10
basically looks like it’s on 0
.
It seems a scale problem. The plot contains 10.000 points and it actually seems that there are points in 0 because the dimensions of the points is bigger than the scale of the axis, but if you zoom in you can note that there are no points in 0.