答案1
因此,正如我在评论中提到的,如果数据没有版权,你可以使用一些免费工具获取图表的数据点。
\documentclass[border=5pt]{standalone}
\usepackage{filecontents}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{filecontents}[overwrite]{data.txt}
x y1 y2
1 9346.504407 9362.980769
2 7425.530849 8350.961538
3 1651.442308 6127.704327
4 -1379.707532 4257.361779
5 -10552.78446 1310.196314
6 -9360.426683 -2444.561298
7 -2228.365385 -4449.519231
8 -3004.607372 -5326.722756
9 -1963.892228 -5447.065304
10 5269.280849 -2302.834535
11 9187.44992 1413.411458
12 3682.942708 2622.846554
13 12363.03085 5699.569311
14 16617.9387 9399.188702
15 1454.427083 8723.657853
16 14476.11178 9680.438702
17 14490.38462 11814.90385
18 16440.00401 12653.94631
19 15815.00401 12533.75401
20 15795.623 15391.77684
21 15776.64263 15574.71955
22 15790.96554 15891.92708
23 13786.10777 15451.97316
24 13783.65385 15045.67308
25 14017.02724 14673.27724
26 15798.127 14586.58854
27 12851.11178 13961.6887
28 13841.34615 14093.75
29 13788.61178 14041.01563
30 13785.93249 13987.85557
31 13783.55369 13480.66907
32 10794.52123 13116.63662
33 13778.92127 13122.67127
34 13776.66767 13120.41767
35 13773.91326 13168.14403
36 13729.59235 13123.82312
37 13769.03045 13769.03045
38 13766.77684 13766.77684
39 14774.01342 13966.32111
40 13720.07712 13871.51943
41 13759.64042 13961.5635
42 13715.06911 13967.47296
43 13754.88281 13956.80589
44 13752.37881 13752.37881
45 13918.14403 13766.70172
46 10760.96755 13234.52524
47 10758.33834 12575.64603
48 13742.73838 12531.19992
49 13740.48478 12528.94631
50 10919.47115 12030.04808
51 13735.60196 12524.0635
52 13733.09796 13127.32873
53 11669.42107 12729.51723
54 13728.21514 12718.59976
55 13768.02885 13263.22115
56 13723.45753 13218.64984
57 12711.58854 13115.4347
58 13718.57472 13466.17087
59 13716.32111 13463.91727
60 13713.94231 13461.53846
61 15688.60176 13871.29407
62 13709.0595 14062.42488
63 11687.32472 13757.03626
64 13704.17668 13704.17668
65 13701.79788 13701.79788
66 13657.35176 13253.50561
\end{filecontents}
\def\height{9cm}
\def\width{16cm}
\begin{document}
\definecolor{myorange}{RGB}{218,89,33}
\definecolor{myblue}{RGB}{83,163,212}
\begin{tikzpicture}
\begin{axis}[
name=plot,
height=\height,
width=\width,
scale only axis=true,
xtick pos=left,
ytick pos=left,
xmin=0,
xmax=70,
ymin=-15000,
ymax=20000,
xlabel=Episode Number,
ylabel=Episode Reward,
title=\textbf{Episode title}
]
\addplot[
color=myblue,
mark=o
]
table[
x=x,
y=y1,
]
{data.txt};
\addplot[
color=myorange,
mark=*,
]
table[
x=x,
y=y2,
]
{data.txt};
\end{axis}
\end{tikzpicture}
\end{document}
您可以根据需要使用\height
和调整高度和宽度并包含生成的pdf文件。\width
如果您需要对图表进行一些调整,请告诉我。