Skip to content

Commit 3045f10

Browse files
committed
make axvline test more robust
1 parent 8c0824d commit 3045f10

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/test_axvline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def plot():
1010
fig = plt.figure()
1111
np.random.seed(123)
1212
s = np.random.normal(0, 1, 10)
13+
plt.gca().set_ylim(-1.0, +1.0)
1314
plt.hist(s, 30)
1415
plt.axvline(1.96)
1516
return fig

test/test_axvline_reference.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
x grid style={white!69.01960784313725!black},
99
xmin=-2.64601320556273, xmax=2.17933396216965,
1010
y grid style={white!69.01960784313725!black},
11-
ymin=0, ymax=1.05
11+
ymin=-1, ymax=1
1212
]
1313
\draw[fill=color0,draw opacity=0] (axis cs:-2.42667924339307,0) rectangle (axis cs:-2.29074205071007,1);
1414
\draw[fill=color0,draw opacity=0] (axis cs:-2.29074205071007,0) rectangle (axis cs:-2.15480485802706,0);
@@ -42,8 +42,8 @@
4242
\draw[fill=color0,draw opacity=0] (axis cs:1.51549934441414,0) rectangle (axis cs:1.65143653709715,1);
4343
\addplot [semithick, color0]
4444
table {%
45-
1.96 0
46-
1.96 1.05
45+
1.96 -1
46+
1.96 1
4747
};
4848
\end{axis}
4949

0 commit comments

Comments
 (0)