Skip to content

Commit b2208c7

Browse files
committed
simplify test a bit
1 parent 6b00999 commit b2208c7

File tree

2 files changed

+14
-26
lines changed

2 files changed

+14
-26
lines changed

test/test_legend_line_scatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def plot():
1010
fig = plt.figure()
1111
t = np.arange(5)
1212
np.random.seed(123)
13-
x = np.random.rand(5)
13+
x = t
1414
plt.plot(t, x, label="line")
1515
plt.scatter(t, x, label="scatter")
1616
plt.legend()

test/test_legend_line_scatter_reference.tex

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,31 @@
44

55
\begin{axis}[
66
legend cell align={left},
7-
legend style={at={(0.03,0.03)}, anchor=south west, draw=white!80.0!black},
7+
legend style={at={(0.03,0.97)}, anchor=north west, draw=white!80.0!black},
88
tick align=outside,
99
tick pos=left,
1010
x grid style={white!69.01960784313725!black},
1111
xmin=-0.229274193548387, xmax=4.22927419354839,
1212
y grid style={white!69.01960784313725!black},
13-
ymin=0.197382370004533, ymax=0.748938053345234
13+
ymin=-0.239285714285714, ymax=4.23928571428571
1414
]
15-
\addplot [only marks, draw=color0, fill=color0, colormap={mymap}{[1pt]
16-
rgb(0pt)=(1,0,0);
17-
rgb(10pt)=(1,0.9375,0);
18-
rgb(11pt)=(0.96875,1,0);
19-
rgb(21pt)=(0.03125,1,0);
20-
rgb(22pt)=(0,1,0.0625);
21-
rgb(32pt)=(0,1,1);
22-
rgb(42pt)=(0,0.0625,1);
23-
rgb(43pt)=(0.03125,0,1);
24-
rgb(53pt)=(0.96875,0,1);
25-
rgb(54pt)=(1,0,0.9375);
26-
rgb(63pt)=(1,0,0.09375)
27-
}]
15+
\addplot [only marks, draw=color0, fill=color0, colormap/viridis]
2816
table{%
2917
x y
30-
0 0.696469185597862
31-
1 0.286139334950379
32-
2 0.226851453564203
33-
3 0.551314769082891
34-
4 0.719468969785563
18+
0 0
19+
1 1
20+
2 2
21+
3 3
22+
4 4
3523
};
3624
\addlegendentry{scatter}
3725
\addplot [semithick, color0]
3826
table {%
39-
0 0.696469185597862
40-
1 0.286139334950379
41-
2 0.226851453564203
42-
3 0.551314769082891
43-
4 0.719468969785563
27+
0 0
28+
1 1
29+
2 2
30+
3 3
31+
4 4
4432
};
4533
\addlegendentry{line}
4634
\end{axis}

0 commit comments

Comments
 (0)