写一个python可视化代码
时间: 2024-02-01 17:04:39 浏览: 26
Sure, here's an example of Python code to visualize a dataset using Matplotlib library:
```
import matplotlib.pyplot as plt
import numpy as np
# Generate random data
x = np.random.rand(100)
y = np.random.rand(100)
# Create a scatter plot
plt.scatter(x, y)
# Add labels and title
plt.xlabel('X-axis')
plt.ylabel('Y-axis')
plt.title('Random Scatter Plot')
# Show the plot
plt.show()
```
This code will generate a scatter plot of randomly generated data and display it using Matplotlib library.