使用 pgfplots 只能看到一个点

使用 pgfplots 只能看到一个点

我正在尝试使用 pgfplots 显示多个图,但只显示一个点(有很多重叠): 地块重叠

乳胶:

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{width=17cm,height=8cm,compat=1.9}
\usepgfplotslibrary{dateplot}

\begin{document}
\begin{center}
\begin{tikzpicture}
    \begin{axis}[
        title={Puissance appelée en kVA},
        date coordinates in=x,
        xlabel={Heure},
        ylabel={P (moy 10mn) [kVA]},
        xtick={2018-08-08 00:00,2018-08-08 02:00,2018-08-08 04:00,2018-08-08 06:00,2018-08-08 08:00,2018-08-08 10:00,2018-08-08 12:00,2018-08-08 14:00,2018-08-08 16:00,2018-08-08 18:00,2018-08-08 20:00,2018-08-08 22:00},
        legend pos=south east,
        ymajorgrids=true,
        grid style=dashed,
        xticklabel=\hour:\minute,
        date ZERO=2018-08-08,
    ]

    \addplot[
        color=blue,
        mark=square,
        ]
        coordinates {
        (18-08-08 09:20,74774.82090696153)(18-08-08 09:30,74774.82090696153)(18-08-08 09:35,74774.82090696153)(18-08-08 09:40,74774.82090696153)(18-08-08 09:50,74774.82090696153)(18-08-08 10:00,74774.82090696153)(18-08-08 10:10,74774.82090696153)(18-08-08 10:20,74774.82090696153)(18-08-08 10:30,74774.82090696153)(18-08-08 10:40,74774.82090696153)(18-08-08 10:50,74774.82090696153)(18-08-08 11:00,74774.82090696153)(18-08-08 11:10,74774.82090696153)(18-08-08 11:20,74774.82090696153)(18-08-08 11:30,74774.82090696153)(18-08-08 11:40,74774.82090696153)(18-08-08 11:50,74774.82090696153)(18-08-08 12:00,74774.82090696153)(18-08-08 12:10,74774.82090696153)(18-08-08 12:20,74774.82090696153)(18-08-08 12:30,74774.82090696153)(18-08-08 12:40,74774.82090696153)(18-08-08 12:50,74774.82090696153)(18-08-08 13:00,74774.82090696153)(18-08-08 13:10,74774.82090696153)(18-08-08 13:20,74774.82090696153)(18-08-08 13:30,74774.82090696153)(18-08-08 13:40,74774.82090696153)(18-08-08 13:50,74774.82090696153)(18-08-08 14:00,74774.82090696153)(18-08-08 14:10,74774.82090696153)(18-08-08 14:20,74774.82090696153)(18-08-08 14:30,74774.82090696153)(18-08-08 14:40,74774.82090696153)(18-08-08 14:50,74774.82090696153)(18-08-08 15:00,74774.82090696153)(18-08-08 15:01,74774.82090696153)(18-08-08 15:10,74774.82090696153)(18-08-08 15:20,74774.82090696153)(18-08-08 15:30,74774.82090696153)(18-08-08 15:40,74774.82090696153)(18-08-08 15:50,74774.82090696153)(18-08-08 16:00,74774.82090696153)(18-08-08 16:10,74774.82090696153)
        };
    \label{PLOT_1}

    \addplot[
        color=red,
        mark=square,
        ]
        coordinates {

        };
        \label{PLOT_2}

    \addplot[
        color=brown,
        mark=square,
        ]
        coordinates {
        (2018-08-08 08:39,33553.8373364359)(2018-08-08 08:40,33553.8373364359)(2018-08-08 08:48,33553.8373364359)(2018-08-08 08:50,33553.8373364359)(2018-08-08 09:00,33553.8373364359)(2018-08-08 09:10,35052.674648306085)(2018-08-08 09:20,35052.674648306085)(2018-08-08 09:30,36529.98768135571)(2018-08-08 09:35,36529.98768135571)(2018-08-08 09:38,36529.98768135571)(2018-08-08 09:40,36529.98768135571)(2018-08-08 09:50,36693.459907727425)(2018-08-08 10:00,36693.459907727425)(2018-08-08 10:10,36693.459907727425)(2018-08-08 10:20,38166.215426735725)(2018-08-08 10:30,38166.215426735725)(2018-08-08 10:40,38166.215426735725)(2018-08-08 10:50,38166.215426735725)(2018-08-08 11:00,38166.215426735725)(2018-08-08 11:10,38166.215426735725)(2018-08-08 11:20,38093.831521651904)(2018-08-08 11:30,38223.16051819891)(2018-08-08 11:40,38223.16051819891)(2018-08-08 11:50,38223.16051819891)(2018-08-08 12:00,38223.16051819891)(2018-08-08 12:10,38323.10008337008)(2018-08-08 12:19,38323.10008337008)(2018-08-08 12:20,38323.10008337008)(2018-08-08 12:30,38184.9446771892)(2018-08-08 12:40,38343.83914007568)(2018-08-08 12:50,38343.83914007568)(2018-08-08 13:00,38343.83914007568)(2018-08-08 13:10,38343.83914007568)(2018-08-08 13:20,38343.83914007568)(2018-08-08 13:30,38203.92649977224)(2018-08-08 13:40,38203.92649977224)(2018-08-08 13:50,38203.92649977224)(2018-08-08 14:00,38203.92649977224)(2018-08-08 14:10,38364.827641995216)(2018-08-08 14:20,38203.92649977224)(2018-08-08 14:30,38203.92649977224)(2018-08-08 14:40,38203.92649977224)(2018-08-08 14:50,38203.92649977224)(2018-08-08 15:00,38203.92649977224)(2018-08-08 15:01,38203.92649977224)(2018-08-08 15:10,38076.37062536291)(2018-08-08 15:20,38203.92649977224)(2018-08-08 15:30,38203.92649977224)(2018-08-08 15:40,38203.92649977224)(2018-08-08 15:50,38203.92649977224)(2018-08-08 16:00,38203.92649977224)(2018-08-08 16:10,38184.42090696152)
        };
        \label{PLOT_3}

    \addplot[
        color=black,
        mark=square,
        ]
        coordinates {
        (2018-08-08 09:19,38407.1)(2018-08-08 09:20,35698.700000000004)(2018-08-08 09:21,36351.3)(2018-08-08 09:30,36565.200000000004)(2018-08-08 09:35,37243.6)(2018-08-08 09:36,37243.6)(2018-08-08 09:40,37024.4)(2018-08-08 09:50,37832.5)(2018-08-08 10:00,37832.5)(2018-08-08 10:10,38585.0)(2018-08-08 10:20,37906.6)(2018-08-08 10:30,37878.1)(2018-08-08 10:39,37878.1)(2018-08-08 10:40,37878.1)(2018-08-08 10:50,38567.6)(2018-08-08 11:00,38342.9)(2018-08-08 11:10,38342.9)(2018-08-08 11:20,39458.0)(2018-08-08 11:30,39692.700000000004)(2018-08-08 11:40,39692.700000000004)(2018-08-08 11:50,39917.8)(2018-08-08 12:00,37576.9)(2018-08-08 12:10,38326.200000000004)(2018-08-08 12:16,39009.5)(2018-08-08 12:20,38781.5)(2018-08-08 12:21,38781.5)(2018-08-08 12:30,38781.5)(2018-08-08 12:40,39063.4)(2018-08-08 12:50,38346.1)(2018-08-08 13:00,38346.1)(2018-08-08 13:10,38346.1)(2018-08-08 13:11,38346.1)(2018-08-08 13:12,38346.1)(2018-08-08 13:18,38347.5)(2018-08-08 13:19,38347.5)(2018-08-08 13:20,38347.5)(2018-08-08 13:21,38347.5)(2018-08-08 13:27,38347.5)(2018-08-08 13:30,38347.5)(2018-08-08 13:40,38347.5)(2018-08-08 13:43,38347.5)(2018-08-08 13:47,38347.5)(2018-08-08 13:50,38347.5)(2018-08-08 14:00,38347.5)(2018-08-08 14:10,38347.5)(2018-08-08 14:19,38347.5)(2018-08-08 14:20,38347.5)(2018-08-08 14:30,38347.5)(2018-08-08 14:40,37674.3)(2018-08-08 14:50,37889.0)(2018-08-08 14:57,37889.0)(2018-08-08 14:58,37889.0)(2018-08-08 14:59,37889.0)(2018-08-08 15:00,37889.0)(2018-08-08 15:01,37662.6)(2018-08-08 15:06,37662.6)(2018-08-08 15:08,37662.6)(2018-08-08 15:10,37879.9)(2018-08-08 15:11,37879.9)(2018-08-08 15:12,37879.9)(2018-08-08 15:14,37879.9)(2018-08-08 15:16,37879.9)(2018-08-08 15:18,37666.5)(2018-08-08 15:19,37879.9)(2018-08-08 15:20,37879.9)(2018-08-08 15:21,38545.6)(2018-08-08 15:22,38545.6)(2018-08-08 15:24,38295.4)(2018-08-08 15:26,38554.9)(2018-08-08 15:26,38554.9)(2018-08-08 15:28,38554.9)(2018-08-08 15:30,38554.9)(2018-08-08 15:31,38554.9)(2018-08-08 15:32,38554.9)(2018-08-08 15:34,38554.9)(2018-08-08 15:36,38554.9)(2018-08-08 15:38,38554.9)(2018-08-08 15:40,38554.9)(2018-08-08 15:41,38554.9)(2018-08-08 15:42,38554.9)(2018-08-08 15:44,38554.9)(2018-08-08 15:46,38554.9)(2018-08-08 15:48,38554.9)(2018-08-08 15:50,38554.9)(2018-08-08 15:51,38554.9)(2018-08-08 15:52,38554.9)(2018-08-08 15:54,38554.9)(2018-08-08 16:00,38554.9)(2018-08-08 16:10,36457.3)(2018-08-08 16:11,36457.3)
        };
        \label{PLOT_4}

    \addplot[
        color=green,
        mark=square,
        ]
        coordinates {
        (2018-08-08 09:19,131.0)(2018-08-08 09:20,131.0)(2018-08-08 09:21,131.0)(2018-08-08 09:30,131.0)(2018-08-08 09:35,131.0)(2018-08-08 09:36,131.0)(2018-08-08 09:40,130.3)(2018-08-08 09:50,133.6)(2018-08-08 10:00,133.6)(2018-08-08 10:10,132.9)(2018-08-08 10:20,133.70000000000002)(2018-08-08 10:30,133.70000000000002)(2018-08-08 10:39,133.70000000000002)(2018-08-08 10:40,133.70000000000002)(2018-08-08 10:50,133.70000000000002)(2018-08-08 11:00,132.8)(2018-08-08 11:10,132.8)(2018-08-08 11:20,131.6)(2018-08-08 11:30,132.4)(2018-08-08 11:40,132.4)(2018-08-08 11:50,132.4)(2018-08-08 12:00,132.4)(2018-08-08 12:10,132.4)(2018-08-08 12:16,132.4)(2018-08-08 12:20,131.6)(2018-08-08 12:21,131.6)(2018-08-08 12:30,131.6)(2018-08-08 12:40,132.6)(2018-08-08 12:50,132.6)(2018-08-08 13:00,132.6)(2018-08-08 13:10,132.6)(2018-08-08 13:11,132.6)(2018-08-08 13:12,132.6)(2018-08-08 13:18,132.6)(2018-08-08 13:19,132.6)(2018-08-08 13:20,132.6)(2018-08-08 13:21,132.6)(2018-08-08 13:27,132.6)(2018-08-08 13:30,132.6)(2018-08-08 13:40,132.6)(2018-08-08 13:43,132.6)(2018-08-08 13:47,132.6)(2018-08-08 13:50,132.6)(2018-08-08 14:00,132.6)(2018-08-08 14:10,131.8)(2018-08-08 14:19,132.6)(2018-08-08 14:20,132.6)(2018-08-08 14:30,132.6)(2018-08-08 14:40,132.6)(2018-08-08 14:50,133.1)(2018-08-08 14:57,133.1)(2018-08-08 14:58,133.1)(2018-08-08 14:59,133.1)(2018-08-08 15:00,133.1)(2018-08-08 15:01,133.1)(2018-08-08 15:06,133.1)(2018-08-08 15:08,133.1)(2018-08-08 15:10,133.1)(2018-08-08 15:11,133.1)(2018-08-08 15:12,133.1)(2018-08-08 15:14,133.1)(2018-08-08 15:16,133.1)(2018-08-08 15:18,133.1)(2018-08-08 15:19,133.1)(2018-08-08 15:20,133.1)(2018-08-08 15:21,133.1)(2018-08-08 15:22,133.1)(2018-08-08 15:24,133.1)(2018-08-08 15:26,133.1)(2018-08-08 15:26,133.1)(2018-08-08 15:28,133.1)(2018-08-08 15:30,133.1)(2018-08-08 15:31,133.1)(2018-08-08 15:32,133.1)(2018-08-08 15:34,133.1)(2018-08-08 15:36,133.1)(2018-08-08 15:38,133.1)(2018-08-08 15:40,133.1)(2018-08-08 15:41,133.1)(2018-08-08 15:42,133.1)(2018-08-08 15:44,133.1)(2018-08-08 15:46,133.1)(2018-08-08 15:48,133.1)(2018-08-08 15:50,133.1)(2018-08-08 15:51,133.1)(2018-08-08 15:52,133.1)(2018-08-08 15:54,133.1)(2018-08-08 16:00,133.1)(2018-08-08 16:10,133.1)(2018-08-08 16:11,133.1)
        };
        \label{PLOT_5}

    \end{axis}
    \node [draw,fill=white] at (rel axis cs: 0.8,0.3) {\shortstack[l]{
        \ref{PLOT_1} Plot 1 \\
        \ref{PLOT_2} Plot 2 \\
        \ref{PLOT_3} Plot 3}};

        % Second "Legend" node
        \node [draw,fill=white] at (rel axis cs: 0.3,0.3) {\shortstack[l]{
        \ref{PLOT_4} Plot 4 \\
        \ref{PLOT_5} Plot 5}};
\end{tikzpicture}
\end{center}
\end{document}

我不明白我做错了什么才会得到这个

谢谢你的帮助!

答案1

日期时间的格式在各个地方并不相同。你为蓝色曲线写道:

(18-08-08 ...

代替 :

(2018-08-08 ...

相关内容