PGFPlots is a remarkable package in LaTeX, to create precise, vectorized, and highly personalized statistic graphs. You could get more information about PGFPlots package on https://github.com/pgf-tikz/pgfplots, thank all those contributors for creating a useful package to plot in LaTeX natively.
PGFPlotsEdt is basically a frontend for this package, to generate PGFPlots code automatically through a web-based user interface. This project is under LaTeX Sparkle Project, you could also get some tips on PGFPlots on this webpage.
TikzEdt is the inspiration of this project, to create LaTeX TikZ graph in WYSIWYG (what you see is what you get) mode. You could download this software on TikzEdt homepage, you could also get more tips on TikZEdt on this webpage.
-
Online version You could use the online version directly:
-
Local version with faster compilation If you want to make sure the data won't go anywhere in the Internet, or try to compile the document faster, use the offline version by downloading the repo and fire up a local server to handle the compling tasks:
- Install TeX distribution on your local computer.
- Install python and the dependencies by
pip install flask
- Start the server.
python server.py
- Open
http://127.0.0.1:5678
in your browser.
For Windows users, the server side will automatically change the fontset used by CJK for a larger compatibility.
-
Local version supercharged by LLM If you want to use LLM to supercharge your PGFPlotsEdt coding experience, use the local server in the llm/ directory. PGFPlotsEdt with LLM uses Llama 3 model deployed by MLC, 6GB free VRAM is required (typical supported device like MacBook Pro).
- Install Anaconda first.
- Use the commands to setup the environment:
cd llm conda env update -n ppedt -f llm.yml
- Stay in llm/ folder, use the commands to start PGFPlotsEdt server with LLM:
conda activate ppedt python server_llm.py
On the first run, the model will be downloaded, which takes some time and disk space. The Llama 3 model will be saved in a temporary folder (in
~/.cache/mlc_llm
directory) and the loading time will be much faster in the following runs.- Open
http://127.0.0.1:5678
in your browser, then press "Edit code manually" button (or just openhttp://127.0.0.1:5678?code_only
directly). If there is a LLM toolbar at the bottom of the text editor, then LLM is ready to go. - If you want to terminate PGFPlotsEdt with LLM, input CTRLC twice in the server console.
-
Deployment version If you want to deploy the server in the LAN, use the deployment server in the directory deploy/, please follow the LICENSE for deployment:
- If you are using *nix operating system for deployment, finish the configuration in Local version with faster compilation step, and
pip install gunicorn
to install the additional package. Then run the deployment server directly by:
cd deploy python gunicorn-deploy.py
- Or you could use Docker for virtualization:
- Use one of the pre-built images directly (Docker Hub or GitHub Packages):
docker pull logcreative/pgfplotsedt:master # Docker Hub docker pull ghcr.io/logcreative/pgfplotsedt:master # GitHub Packages
- Or you could build a docker container from the source:
cd deploy docker-compose up --build
- Then the deployment will be on
[IP]:5678
.
- If you are using *nix operating system for deployment, finish the configuration in Local version with faster compilation step, and
Vue.js is the progressive JavaScript framework for this project.
LaTeXOnline is the chosen online LaTeX compiler for previewing the graph result.
MathJax is the TeX typeset rendering machine for previewing the formula input.
Llama 3 is the chosen large language model to generate code. The LLM model is deployed by MLC LLM.
Copyright (c) 2020-2024 Log Creative & LaTeX Sparkle Project