我有一个这样的清单:
x = ['alice', 'bob', ...] # len(x) > 100
y = [23, 323, ...] # just some number
plt.plot(x, y)
plt.show()
Run Code Online (Sandbox Code Playgroud)
绘制时,它显示x列表的每个值。有没有一种方法可以只显示某些值,x[0], x[10], ...但数字仍然相同。
我在网上发现了什么,例如在matplotlib中更改x或y轴上的“刻度频率”?全部基于x轴的值int。当x轴的值为字符串时,我不确定该怎么做。
如您所见,即使我将x轴标签旋转90度,它仍然很拥挤,因此我仍然需要找到一种减少显示的x数量的方法。
在mysql交互式终端中,当我想创建一个新的数据库时
mysql> create database albedo-new;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-new' at line 1
mysql> create database 'albedo-new';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''albedo-new'' at line 1
Run Code Online (Sandbox Code Playgroud)
我不确定mysql是否允许在数据库名称中使用' - '.
我不小心删除了/etc/libvirt/qemu/networks/default.xml. 如何恢复?谢谢。