Skip to main content

Questions tagged [matplotlib]

Matplotlib is a 2D plotting library for Python, built on NumPy and often used interactively with IPython. Its "pylab" interface is similar to the plotting functions of MATLAB®.

0 votes
0 answers
16 views

"An associated PostScript font (required by Matplotlib) could not be found for TeX font 'zptmcm7y' in

An associated PostScript font (required by Matplotlib) could not be found for TeX font 'zptmcm7y' in 'C:/Users/Admin/AppData/Local/MiKTeX/fonts/map/pdftex/pdftex.map'; this problem can often be ...
astra inclinant's user avatar
1 vote
1 answer
88 views

pgf import in LaTeX not working due to matplotlib axes font

I was plotting as usual and then after saving one of my plots as a pgf and then compiling LaTeX it didn't work anymore. As far as I'm aware of, I didn't change anything it just so happen to top ...
L_physics's user avatar
0 votes
0 answers
36 views

Matplotlib - Latex Premable Package not loading

I want to use LaTeX in the x-label of a plot. I need the label to be \varepsilon with a subscript that is a smaller version of the \parallel symbol. This is what I have tried but it does not work, I ...
Euler_Salter's user avatar
0 votes
0 answers
100 views

Tikzplotlib not outputting Matplotlib's PyPlot colour bars

I'm trying to output contour plots made with PyPlot to Tikz using Tikzplotlib, but the color bars aren't appearing in the outputted TeX code. The contour plots themselves aren't appearing either ...
TheorVHP's user avatar
0 votes
1 answer
204 views

How to use Matplotlib plot markers in LaTex text

I want to use plot markers from Matplotlib in Latex. Especially I am looking for Latex equivalents of the symbols '1', '2', '3' and '4', as used for the 'two pairs' label in the plot. I already looked ...
scleronomic's user avatar
1 vote
0 answers
187 views

Change "contour filled" smooth interpolation scheme. And problem with multiple contour filled on same axis

In this post I would like to solve two "issues" concerning PGF. The first one is the fact that adding multiple contour filled on the same axis, is producing a separation line that I would ...
TOP1's user avatar
  • 11
0 votes
1 answer
2k views

Matplotlib and Latex with all bold

I used to render all my Matplotlib fonts with latex and bold as follows: plt.rc('font', family='serif',size=20) matplotlib.rc('text', usetex=True) matplotlib.rc('legend', fontsize=14) matplotlib....
diedro's user avatar
  • 179
1 vote
1 answer
846 views

Formating a scalebar with Latex in the title of a Matplotlib figure

I have an image in matplotlib, and I want to put a scalebar in the title using Latex syntax. Using the \vdash and \dashv commands I can get the ends of the scalebar, as can been seen in the Figure, ...
Martin Gardfjell's user avatar
0 votes
1 answer
118 views

PGF generated with matplotlib contourf produces artifacts in pdf

I generate a contourplot with matplotlib.pyplot.contourf that produces a nice preview image: But when I include the image into my document (using the exact same settings that I successfully employ ...
Dan Doe's user avatar
  • 111
0 votes
0 answers
42 views

Matplotlib PGF Greek Char

To include plots in Latex I use pythons matplotlib (v3.5.2). The plots are then exported as pgf so that they can be included in the latex document (with \input...). However, as soon as I use a Greek ...
binex6's user avatar
  • 17
1 vote
1 answer
1k views

Saving plots with a legend tikzplotlib gives an Error in latex

I'm getting an error when I generate a (line)plot with either matplotlib or Seaborn and save it with tikzplotlib to use it later in latex. Everything works until I add a legend to the plot. This ...
Alex Günsberg's user avatar
2 votes
0 answers
320 views

Reduce file size of imported graphics and their fonts

I am looking to reduce the file size of the final version of my thesis as much as possible without real hassle and any loss of quality. At the moment it is around 7 MB. I read much about it (...
ACCakut's user avatar
  • 31
2 votes
1 answer
512 views

Matplotlib PGF backend packages installed by Latex

I want to produce an image to use in Latex. The PDF image is quite large (~200 MB), and as a solution, I wanted to use the PGF backend. So, using the guide here, I added this line: plt.savefig('figure....
ck1987pd's user avatar
  • 145
1 vote
0 answers
377 views

Legend and axis label of pgf plot displayed differently in beamer

I created different plots with matplotlib, which I export as .pgf files. I then import these plots again in latex to display them in my document. This process works fine with the following code: ...
JANO's user avatar
  • 113
9 votes
0 answers
320 views

Using some packages adds a vertical offset when using LaTeX to render text in matplotlib/python figures

I was advised to post here in the comments on a post I made on Stack Overflow. I'm using LaTeX to render my text in figures in the Python package matplotlib. My problem was that when I added siunitx ...
TomVincentUK's user avatar

15 30 50 per page
1
2 3 4 5 6