Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tikz-plots get recompiled every time when using pgfplots in conjuction with tikzscale #3

Open
roteiro opened this issue Feb 9, 2016 · 0 comments

Comments

@roteiro
Copy link

roteiro commented Feb 9, 2016

Setup: Win7+TeXLive 2015 (tikzscale 0.2.6, pgfplots 1.13), TexStudio
Problem also described here by me:
and probably here

When using pgfplots in conjunction with tikzscale the tikz-files get recompiled every time when running pdflatex, although they should only get recompiled when the pdf-output-files are not there or the file changed.

I played around with the different "up to date check" and "mode" settings, nothing seems to help. If I include files with input instead of includegraphics, so the tikzscale package is not used, it works as expected, tikz-files do not get recompiled, if the output files already exist.

The recompilation needs a lot of time, so i would like to omit it. According to the tikzscale-documentation, tikzscale supports the TikZ’ externalization library.

The attaced MWE shows this behaviour. Test.tikz (included via includegraphics) is recompiled everytime, Test2.tikz only, if the output-pdf was deleted manually before.

MWE

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{pgfplots}
\usepackage{tikzscale} 
\usepgfplotslibrary{external} 
\tikzexternalize[prefix=tikzTest/] 
\newlength\figureheight 
\newlength\figurewidth

\begin{document}
\begin{figure}
\tikzsetnextfilename{test}
\includegraphics[width=0.75\textwidth]{tikzTest/test.tikz}
\end{figure}

\begin{figure}
\setlength\figureheight{0.75\textwidth} 
\setlength\figurewidth{0.75\textwidth}
\tikzsetnextfilename{test2}
\input{tikzTest/test2.tikz}
\end{figure}
\end{document}

Test.tikz

\begin{tikzpicture}[%
trim axis left, trim axis right
]

\begin{axis}[%
separate axis lines,
every outer x axis line/.append style={black},
every x tick label/.append style={font=\color{black}},
xmin=0,
xmax=10,
every outer y axis line/.append style={black},
every y tick label/.append style={font=\color{black}},
ymin=0,
ymax=100
]
\addplot [color=black,solid,forget plot]
  table[row sep=crcr]{%
0   0\\
1   1\\
2   4\\
3   9\\
4   16\\
5   25\\
6   36\\
7   49\\
8   64\\
9   81\\
10  100\\
};
\end{axis}
\end{tikzpicture}%

Test2.tikz

% This file was created by matlab2tikz.
% Minimal pgfplots version: 1.3
%
%The latest updates can be retrieved from
%  http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz
%where you can also make suggestions and rate matlab2tikz.
%
\begin{tikzpicture}

\begin{axis}[%
width=0.95092\figurewidth,
height=\figureheight,
at={(0\figurewidth,0\figureheight)},
scale only axis,
separate axis lines,
every outer x axis line/.append style={black},
every x tick label/.append style={font=\color{black}},
xmin=0,
xmax=10,
every outer y axis line/.append style={black},
every y tick label/.append style={font=\color{black}},
ymin=0,
ymax=100
]
\addplot [color=black,solid,forget plot]
table[row sep=crcr]{%
0   0\\
1   1\\
2   4\\
3   9\\
4   16\\
5   25\\
6   36\\
7   49\\
8   64\\
9   81\\
10  100\\
};
\end{axis}
\end{tikzpicture}%

[MWE.zip](https://github.com/MagicMuscleMan/tikzscale/files/122757/M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant