Skip to content

Commit

Permalink
update api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jue-Xu committed Aug 9, 2024
1 parent 3371303 commit 4849546
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ H = spin.Nearest_Neighbour_1d(4, Jx=1.0)
H.ham
```
More usage in
https://jue-xu.github.io/Cookbook-Quantum-Simulation
https://jue-xu.github.io/cookbook-quantum-simulation
<!-- https://github.com/Jue-Xu/Quantum-Simulation-Recipe/tree/main/tests/test.ipynb -->


Expand Down
10 changes: 5 additions & 5 deletions quantum_simulation_recipe/plot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from matplotlib.colors import ListedColormap
import colorsys

mpl.rcParams['font.family'] = 'sans-serif' # 'Helvetica'
mpl.rcParams['font.family'] = 'Helvetica' # 'Helvetica' sans-serif
mpl.rcParams["xtick.direction"] = 'out' # 'out'
mpl.rcParams["ytick.direction"] = 'out'
mpl.rcParams['legend.frameon'] = True
Expand Down Expand Up @@ -194,14 +194,14 @@ def ax_set_text(ax, x_label, y_label, title=None, legend='best', xticks=None, yt
# else:
# plt.plot(x, y, marker, label=label, linewidth=linewidth, markeredgecolor=markeredgecolor, markeredgewidth=0.5, alpha=alpha)

def plot_evo(ax, t_list, y_list, marker, color='', title='', xlabel='', ylabel='', label='', markersize=SMALL_SIZE, markeredgewidth=WIDTH, lw=WIDTH, alpha=0.3, inset=False):
if color == '':
ax.plot(t_list, y_list, marker, label=label, markersize=markersize, markeredgewidth=markeredgewidth, linewidth=lw)
def plot_evo(ax, t_list, y_list, marker, c='', title='', xlabel='', ylabel='', label='', ms=SMALL_SIZE, mew=WIDTH, lw=WIDTH, alpha=0.3, inset=False):
if c == '':
ax.plot(t_list, y_list, marker, label=label, markersize=ms, markeredgewidth=mew, linewidth=lw)
# ax.plot(t_list, y_list, '-', markersize=5)
# ax.plot(t_list, y_list, 'o', label=label, markersize=5)
# ax.plot(t_list, y_list, marker, label=label, markeredgecolor='k', markeredgewidth=0.4, markersize=5)
else:
ax.plot(t_list, y_list, marker, color=color, label=label, markeredgecolor=color, markeredgewidth=markeredgewidth, markersize=markersize, linewidth=lw, mfc=lighten_color(color, alpha))
ax.plot(t_list, y_list, marker, color=c, label=label, markeredgecolor=c, markeredgewidth=mew, markersize=ms, linewidth=lw, mfc=lighten_color(c, alpha))
# ax.plot(t_list, y_list, marker, color=color, label=label, markeredgecolor=color, markeredgewidth=0.4, markersize=markersize, mfc=color[:-2]+"80")
if not inset:
ax.set_title(title)
Expand Down

0 comments on commit 4849546

Please sign in to comment.