Report ready for proofreading and review.
This commit is contained in:
@@ -9,17 +9,23 @@ params = {
|
||||
"font.family": "Serif",
|
||||
"font.serif": "Roman",
|
||||
"text.usetex": True,
|
||||
"axes.titlesize": "large",
|
||||
"axes.labelsize": "large",
|
||||
"xtick.labelsize": "large",
|
||||
"ytick.labelsize": "large",
|
||||
"legend.fontsize": "medium",
|
||||
"xtick.bottom": False,
|
||||
"xtick.labelbottom": False,
|
||||
"ytick.left": False,
|
||||
"ytick.labelleft": False,
|
||||
"axes.grid": False,
|
||||
# "figure.autolayout": True
|
||||
# "figure.constrained_layout.use": False,
|
||||
# "figure.constrained_layout.h_pad": 0.04167,
|
||||
# "figure.constrained_layout.w_pad": 0.04167
|
||||
# "figure.subplot.wspace": 0,
|
||||
# "figure.subplot.hspace": 0
|
||||
}
|
||||
plt.rcParams.update(params)
|
||||
|
||||
|
||||
def plot():
|
||||
fig, axes = plt.subplots(nrows=3, ncols=3)
|
||||
fig, axes = plt.subplots(figsize=(6,6), nrows=3, ncols=3)
|
||||
with open("data/color_map.txt") as f:
|
||||
lines = f.readlines()
|
||||
size = int(lines[0])
|
||||
@@ -35,39 +41,45 @@ def plot():
|
||||
arr = arr.reshape(size, size).T
|
||||
|
||||
# Plot color maps
|
||||
color_map1 = axes[i,0].imshow(
|
||||
color_map1 = axes[0, i].imshow(
|
||||
np.multiply(arr, arr.conj()).real,
|
||||
interpolation="nearest",
|
||||
cmap=sns.color_palette("mako", as_cmap=True)
|
||||
)
|
||||
color_map2 = axes[i,1].imshow(
|
||||
color_map2 = axes[1, i].imshow(
|
||||
arr.real,
|
||||
interpolation="nearest",
|
||||
cmap=sns.color_palette("mako", as_cmap=True)
|
||||
)
|
||||
color_map3 = axes[i,2].imshow(
|
||||
color_map3 = axes[2, i].imshow(
|
||||
arr.imag,
|
||||
interpolation="nearest",
|
||||
cmap=sns.color_palette("mako", as_cmap=True)
|
||||
)
|
||||
|
||||
# Create color bar
|
||||
fig.colorbar(color_map1, ax=axes)
|
||||
# fig2.colorbar(color_map2, ax=ax2)
|
||||
# fig3.colorbar(color_map3, ax=ax3)
|
||||
fig.subplots_adjust(wspace=0, hspace=0)
|
||||
# fig.colorbar(color_map1, ax=axes[0, 2])
|
||||
# fig.colorbar(color_map2, ax=axes[1, 2])
|
||||
# fig.colorbar(color_map3, ax=axes[2, 2])
|
||||
|
||||
# # Remove grids
|
||||
axes.grid(False)
|
||||
# ax2.grid(False)
|
||||
# ax3.grid(False)
|
||||
# Remove grids
|
||||
# for i in range(3):
|
||||
# axes[i, 0].set_xticks([])
|
||||
# axes[i, 0].set_yticks([])
|
||||
# axes[i, 0].
|
||||
# axes[i, 1].set_xticks([])
|
||||
# axes[i, 1].set_yticks([])
|
||||
# axes[i, 2].set_xticks([])
|
||||
# axes[i, 2].set_yticks([])
|
||||
|
||||
# # Set custom ticks
|
||||
# ax1.set_xticks(ticks)
|
||||
# ax1.set_yticks(ticks)
|
||||
# ax2.set_xticks(ticks)
|
||||
# ax2.set_yticks(ticks)
|
||||
# ax3.set_xticks(ticks)
|
||||
# ax3.set_yticks(ticks)
|
||||
|
||||
# axes[0].set_xticks([])
|
||||
# axes[0].set_yticks([])
|
||||
# axes[1].set_xticks([])
|
||||
# axes[].set_yticks([])
|
||||
# axes[].set_xticks([])
|
||||
# axes[].set_yticks([])
|
||||
|
||||
# # Set labels
|
||||
# ax1.set_xlabel("x-axis")
|
||||
@@ -78,7 +90,7 @@ def plot():
|
||||
# ax3.set_ylabel("y-axis")
|
||||
|
||||
# # Save the figures
|
||||
fig.savefig(f"latex/images/color_map_all.pdf", bbox_inches="tight")
|
||||
plt.savefig(f"latex/images/color_map_all.pdf", bbox_inches="tight")
|
||||
# fig2.savefig(f"latex/images/color_map_{i}_real.pdf", bbox_inches="tight")
|
||||
# fig3.savefig(f"latex/images/color_map_{i}_imag.pdf", bbox_inches="tight")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user