'How to scale a vector containing x or y axis data by a constant factor, e.g. 100 or 0.01

I plot some data using matplotlib, now I want to multiply the x_axis by 100. My problem is that the x_axis is text format, what I mean is that:

print(x)--> Text(0.5, 0, 'time (ps)')
plt.plot(rmsd, color='blue')
x = plt.xlabel('time (ps)')
y_1 = plt.ylabel('rmsd_join (nm)')


plt.plot(np.arange(40, len(rmsd)*100, 100), rmsd, color='b')
x = plt.xlabel('time (ps)')
y_1 = plt.ylabel('RMSD_join (nm)')

test data for rmsd:

[0. 0.10993838 0.12384398 0.13261515 0.12955852 0.12920746 0.12922838 0.1342765 0.14746922 0.14724171 0.15128462 0.16030522 0.15995741 0.15604569 0.16712566 0.15712656 0.16754897 0.16771026 0.16590466 0.1708724 0.15938507 0.16021411 0.16368654 0.16497642 0.15517348 0.1557821 0.15674755 0.16893421 0.16883816 0.16835387 0.16886058 0.16845982 0.16266923 0.1667564 0.16850154 0.17983358 0.180383 0.18168528 0.17745751 0.1723941 0.1763786 0.18912238 0.18045492 0.17736912 0.18628192 0.18547903 0.17390871 0.18494183 0.19064023 0.18160789 0.19462068 0.185878 0.19211231 0.19208416 0.18572375 0.19119252 0.19534728 0.19491221 0.19951849 0.2061197 ]



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source