Linked Questions

Popular Questions

I need to prepare scatterplot using all values in data frame and plot them this way to all values above some limit (1) will have one color (red). I read documentation and im confused:

vmin, vmax : float, optional

When using scalar data and no explicit norm, vmin and vmax define the data range that the colormap covers. By default, the colormap covers the complete value range of the supplied data. It is an error to use vmin/vmax when a norm instance is given (but using a str norm name together with vmin/vmax is acceptable).

This parameter is ignored if c is RGB(A).""

My code for now:

points = plt.scatter(
    set1["r12_load_MW"],
    set1["dda201FrequencyHz"],
    c=set1["dda201Amplitude"],
    s=20,
    cmap="rainbow",
    alpha=1,
    vmin=0,
    vmax=1

) 
plt.rcParams["figure.figsize"] = [20.5, 10.5]


plt.title("Sensor: run2_dda2_201")
plt.xlim(-50, 420)
plt.ylim(0, 420)
plt.xlabel("r12_load_MW")
plt.ylabel("dda201FrequencyHz")
cbar = plt.colorbar(points)
cbar.set_label("dda201Amplitude")
plt.rcParams.update({"font.size": 20})

Does this plot shows normalized values or takes all as is? Based on plots its hard to say.

Related Questions