So entfernen Sie kleine Häkchen oben in pgfplots

So entfernen Sie kleine Häkchen oben in pgfplots

Ich suche nach einer Möglichkeit, die kleinen Häkchen oben in meiner Abbildung (die kleinen grauen) zu entfernen, sie aber entlang der x-Achse intakt zu halten. Mein Code ist der folgende:

\begin{figure}[h]
\caption{Distribution of visitor}
\label{DistributionFirmVisitors}
\begin{center}
\begin{tikzpicture}
\begin{axis}[width=10cm,height=7cm,
ylabel={\% of EDGAR visitors},
xmin=1, 
xmax=200,
ymin=0.3, 
ymax=1,
xtick={1, 25, 50, 75, 100, 125, 150, 175, 200},
ytick={0.3,0.4,0.5,0.6,0.7,0.8,0.9,1},
xticklabel style={/pgf/number format/1000 sep=,rotate=60,anchor=east,font=\normalsize},
tick label style={/pgf/number
format/precision=5},
scaled y ticks = false,
legend pos=north east,
ymajorgrids=true,
grid style=dashed,
every axis plot/.append style={thick},
axis background/.style={fill=gray!5},
] 

\addplot[
color=black,
]
coordinates {

(1, 0.1)
(25, 0.1)
(50,0.1)
(75,0.1)    
(100,   0.1)
(200,   0.1)

};


\end{axis}
\end{tikzpicture} \\
\end{center}
\end{figure} \vspace{0.4cm}

Antwort1

Ich vermute, Sie suchen nach xtick pos=lower.

% used PGFPlots v1.16
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
    \pgfplotsset{compat=1.3}
\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        width=10cm,
        height=7cm,
        ylabel={\% of EDGAR visitors},
        xmin=1,
        xmax=200,
        ymin=0.3,
        ymax=1,
        xtick={1, 25, 50, 75, 100, 125, 150, 175, 200},
        ytick={0.3,0.4,0.5,0.6,0.7,0.8,0.9,1},
        xticklabel style={
            rotate=60,
            anchor=east,
            font=\normalsize,
        },
        ymajorgrids=true,
        grid style=dashed,
        axis background/.style={fill=gray!5},
        xtick pos=lower,    % <-- added
    ]

        % (because of y = 0.1 and `ymin=0.3` it is invisible anyway)
        \addplot coordinates {(1,0.1)};

    \end{axis}
\end{tikzpicture}
\end{document}

Bild, das das Ergebnis des obigen Codes zeigt

verwandte Informationen