-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotformatting.py
More file actions
32 lines (28 loc) · 1.04 KB
/
plotformatting.py
File metadata and controls
32 lines (28 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 25 17:40:42 2019
@author: QuantumEngineer3
"""
from matplotlib import rcParams
import matplotlib as mpl
import colorcet
rcParams['xtick.direction'] = 'in'
rcParams['ytick.direction'] = 'in'
rcParams['axes.grid'] = True
# Some notes
# alpha > 0 preferred to dashed lines
magnetization_colormap = colorcet.cm.coolwarm
phase_colormap = "hsv"
contrast_colormap = colorcet.cm.fire
correlation_colormap = colorcet.cm.coolwarm
atom_cmap = colorcet.cm.blues
def transparent_edge_plot(ax, x, y, yerr=None, marker='o', ms=12, **kwargs):
if yerr is not None:
base, _, _ = ax.errorbar(x, y, yerr, ms=ms, marker=marker,
linestyle="None", alpha=0.6, markeredgewidth=2, **kwargs)
else:
base, = ax.plot(x, y, ms=ms, marker=marker, linestyle="None",
alpha=0.5, markeredgewidth=2, **kwargs)
ax.plot(x, y, ms=ms, marker=marker, linestyle="None",
markeredgecolor=base.get_color(), markerfacecolor="None", markeredgewidth=2)
return ax