Matplotlib

plt.rcParams['figure.figsize'] = [12, 8]
#plt.rcParams.update(plt.rcParamsDefault)
plt.figure(figsize = (12, 8))
plt.plot(x, y, 'o')
plt.errorbar(x, y, xerr=(xl, xh), fmt='o', color='black', ecolor='red', capsize=5)
plt.xlim(0, 1)
plt.xticks([])
plt.yticks([])
plt.xticks(np.arange(0, 1, 0.1))
plt.xlabel('X')
plt.grid()
plt.legend()
plt.savefig('figure.png', bbox_inches='tight')
plt.show()
plt.imshow(img, cmap='gray')
plt.colorbar()
fig, ax = plt.subplots(figsize = (8, 6))
ax.plot(x, y, marker="o", linestyle="-", label="1")
ax.plot(x, y, marker="s", linestyle="-", label="2")
ax.set_xlim(0.1, 100)
ax.set_ylim(0.1, 100)
ax.set_xticks(np.arange(0.1, 100, 1.0))
ax.set_yticks(np.arange(0.1, 100, 1.0))
ax.set_xscale("log")
ax.set_yscale("log")
ax.set_xlabel("X")
ax.set_ylabel("Y")
ax.set_title("Title")
ax.legend()
ax.grid(linestyle='--')
plt.savefig('figure.png', bbox_inches='tight')
plt.show()
im = ax.imshow(img, cmap='gray')
fig.colorbar(im, ax=ax)

Daiphys is a professional-service company for research and development of leading-edge technologies in physics and engineering.
Get started accelerating your business through our deep expertise in R&D with AI, quantum computing, and space development; please get in touch with Daiphys today!

Name*


Email*


Message*


* Indicates required field

Daiphys Technologies LLC - https://www.daiphys.com/

  • Last modified: 2024/02/22 02:32
  • by Daiphys