-
-
Notifications
You must be signed in to change notification settings - Fork 2
CacheMeCode python option for include/input (instead of includegraphics) to work with tikzplotlib #21
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
Comments
Definitely yes, there is
This is because you forgot to specify a template (you get a weird error message), like So I tried to write that but I can't manage to install the python lib so I can't test:
let me know if it works. PS: next time, can you try to provide a full reproducible example, starting with |
(Ok, I can't install tikzplotlib because of nschloe/tikzplotlib#559) |
After adding
the above code (fixed now) works (needed to force |
Awesome, thank you very much. I only missed the
And the not working one with matplotlib. I suppose I can not simply add
Yes, matplotlib has to be lower than 3.8 to work with tikzplotlib. Very sad indeed, it seems to be a better library, since it does automatically detect the need for more space in the title, because of the fraction. |
I don't have a computer with me to test, but is the |
No worry, there is no need for haste ;) Edit:
I am sorry. I grasp the idea what you propose, but I seem unable to do so. I am probably not familiar enough with robust extrenalize, sorry. |
To include a different file, you can add Demo:
|
Works perfectly, thank you very much again! |
Would it be possible to create a preset, which doesn't care for the filetype? |
Never mind, without tikzplot this is possibel with the normal python preset. |
What do you mean exactly? Creating a 100% extension agnostic preset is kind of hard, since there might be different kinds of inputs (like what do you do if you output multiple files?), languages, and include commands. But I can definitely try to find a more easy to use approach, like |
I mean, that with tikzplotlib there is a tex file created, and with the pgf option there is a pgf file created. It was not possible to use the same preset for tikzplot and pgf. I would have expected for input to accept any file with the name, that is processible by latex. But you don't have to do that. I do can not use tikplotlib really, because it is doing funny things with numbers and I can not configure it. |
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to use the CacheMeCode environment to accept a .tex file instead of a pdf? I am trying to create a plot with python and the tikzplotlib library. Which produces a .tex file including a tikzpicture converted from the python plot.
This would be great, because with both python option, matplotlib export to pgf or tikzplotlib, will allow latex to set all text, which sets font, fontsize etc the same for any plot and the main text.
Here is a working python code. Working if run externally and included with input.
If I try to run this in CacheMeCode pytho and replaced the filename with
__ROBEXT_OUTPUT_PDF__,
it complains, that the file is not a pdf.Edit: I tryed to create my own preset, like in the docs. And run the code with \cacheMe, but I get the error "(robExt) the placeholder does not exists" and a few others. Here is the code:
And also in an environtment without the placeholder. But it results in the same errors.
Edit2: There is a file created but it is only comprised of the python command
python "robExt-5A490EBC95CB8773B752347B7CE4F90D.tex"
. The filename to run python on is the same as the file itself.Edit3: Nor does the conversion to .pgf file from python matpltolib work. Here is a working python code which does not work inside cacheMeCode.
The text was updated successfully, but these errors were encountered: