You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, matplotlib2tikz does not regard this. It could be done using the 'mark repeat' option or even 'mark indices' (see PGFPlots manual pp. 179-180)
Minimal example:
import matplotlib.pyplot as pp
import matplotlib2tikz as m2t
pp.plot(range(10), range(10), marker='o', markevery=3)
m2t.save('mark.tikz')
gives the output
% This file was created by matplotlib2tikz v0.5.6.
% The lastest updates can be retrieved from
%
% https://github.com/nschloe/matplotlib2tikz
%
% where you can also submit bug reports and leavecomments.
%
\begin{tikzpicture}
\begin{axis}[
xmin=0, xmax=9,
ymin=0, ymax=9,
axis on top
]
\addplot [blue, mark=*, mark size=3, mark options={draw=black}]
table {%
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
};
\end{axis}
\end{tikzpicture}
It should give something like
% This file was created by matplotlib2tikz v0.5.6.
% The lastest updates can be retrieved from
%
% https://github.com/nschloe/matplotlib2tikz
%
% where you can also submit bug reports and leavecomments.
%
\begin{tikzpicture}
\begin{axis}[
xmin=0, xmax=9,
ymin=0, ymax=9,
axis on top
]
\addplot [blue, mark=*, mark size=3, mark repeat=3, mark options={draw=black}]
table {%
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
};
\end{axis}
\end{tikzpicture}
The text was updated successfully, but these errors were encountered:
Plotting dense data with the 'markevery=' should result in plots where not all data points are drawn with a marker, as described in
http://matplotlib.org/api/lines_api.html#matplotlib.lines.Line2D.set_markevery
However, matplotlib2tikz does not regard this. It could be done using the 'mark repeat' option or even 'mark indices' (see PGFPlots manual pp. 179-180)
Minimal example:
gives the output
It should give something like
The text was updated successfully, but these errors were encountered: