Search code examples
pythonscatter-plotaxis

Why the scatter plot is plotting zero data points when the data has no zero values


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.


Solution

  • 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.