Dashed line pattern gets distorted when exporting to tikz
I noticed this bug while using Octave, which uses gl2ps to export plots. Using this .m-file in Octave using the Qt graphics toolkit results in a tikz file that looks different from all other outputs. The bigger the curvature, the smaller do the gaps between the dashes get.
graphics_toolkit ("qt")
close all
x = 0:0.01:1;
y = sin(x*2*pi);
plot(x,y,'--');
print -dpdf test.pdf
print -dpng test.png
print -djpg test.jpg
print -dsvg test.svg
print -dtikz test.tikz
LaTeX document:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\resizebox{\textwidth}{!}{
\input{test.tikz}
}
\end{document}
Result:
vs.
It seems the gap is not only dependent on the curvature, since in this case it seems to get smaller and smaller the bigger, cf. the file unforcedresponselsim.tikz created when running the preparation.m in Octave.
Original bug report: https://savannah.gnu.org/bugs/?50996