Closed Shushman closed 6 years ago
This looks good to me. @tawheeler it looks like you added the mktempdir
calls? It seems to break things by creating a bunch of nested temp directories. If you agree with these changes, you can merge.
Making a PR comment about a question I had - I believe that Base.show
, at least when called from the PGFPlots
notebook, looks for the tmp_1000000x.png
file created by PGFPlots
(which is sent to it as tp.data
?).
I think the .png
is always created in the current directory, which means that the save
called inside Base.show
should also be in the current directory. Since the save(SVG)
is called with filename "tikzpicture"
without any prefixed foldername, is that always going to be fine?
IMO the package should not expose any files to the user unless the user asks for them. I'd change it so that show
generates the file in a temp directory.
Agreed with @tawheeler
@mykelk has suggested I merge after the tests pass. I have changed save(SVG)
to have independent behavior and also made usePDF2SVG
a global flag
Several bug fixes about file saving in
tmp
dirs that were breakingPGFPlots
. Essentially, with the multiple calls tomktempdir
, nesting of temp dirs was happening, and thetmp_10000001.png
files generated byPGFPlots
were not being found.I have basically changed it to output everything to the current directory or the directory preceding the filename, and then switch back to the current directory after being done. Please review