Insert a PGF Plot File to Latex: A Step Guide – Latex Tutorial

By | November 23, 2020

Inserting a pgf file is a good way to insert images in latex. In this tutorial, we will introdue you how to insert it.


You can create a pgf file to contains your plot. Here is an example:

Matplotlib Generate PGF File: Create a PGF Plot – Matplotlib Tutorial

In this tutorial, we have created a test.pgf file, we will start to insert it to latex.

Insert pgf to latex

Here is an example code to insert pgf to latex.

% your document class here



    \caption{A PGF test from \texttt{matplotlib}.}

Then you can find the result:

Matplotlib Generate PGF File - Create a PGF Plot - Matplotlib Tutorial

Meanwhile, we can find the text in graphic is also enlarged if you enlarge the pdf file.

insert pgf to latex

Leave a Reply

Your email address will not be published. Required fields are marked *