如何绘制平稳序列

问题描述 投票:0回答:0

我有一个值不变的系列,即所有值都集中在一个点上。我正在尝试使用 Matplotlib 绘制它,但我在图中看不到它。我做错了什么?有什么办法吗?

x_values1 = [2.5,2.5,2.5,2.5,2.5,2.5]
y_values1 = [1.0,1.0,1.0,1.0,1.0,1.0]

# Create a new figure and plot the XY coordinates
plt.figure(figsize=(1, 3))  # Adjust the figure size as needed
plt.plot(x_values1, y_values1, label='Series 1')
plt.show()

相同的代码适用于具有不同数据的任何其他系列。

我期待在情节上看到一些东西,很可能是一个小点。我改变了规模,希望在较小的规模上,它可能会变得可见。

python matplotlib plot visualization
© www.soinside.com 2019 - 2024. All rights reserved.