Skip to main content

All Questions

Tagged with
0 votes
0 answers
63 views

Plot clipped when saving with Matplotlib, but recovered when imported to Inkscape

I'm saving a plot using Matplotlib (3.6.2, with Python 3.9.12, Windows 10). Part of the x, y labels get clipped. To reproduce: import numpy as np import matplotlib.pyplot as plt x = np.arange(100) y =...
Zhengyang's user avatar
2 votes
1 answer
239 views

Inkscape PDF to eps conversion with matplotlib generated font

I usually create figures using matplotlib. Here is a minimal working example: def cm2inch(*tupl): inch = 2.54 if isinstance(tupl[0], tuple): return tuple(i/inch for i in tupl[0]) ...
Wolpertinger's user avatar
  • 1,251
0 votes
0 answers
82 views

remapping svg to different coordinate system

I have an svg that I'd like to display using nonlinear coordinates, on semilog axes for instance. Is there a way to do this using e.g. matplotlib,inkscape, gimp that would avoid diving into the ...
jeremy_rutman's user avatar
0 votes
1 answer
351 views

How to change the color (e.g., with Inkscape) of a scatter plot made with pyplot and exported in .svg?

I like to export my plots in .svg and to tweak colors, etc. using a svg editor after a while. I can change the color of most elements but I cannot change the color (or line width) of markers in a ...
fdeloche's user avatar
0 votes
1 answer
447 views

Matplotlib, Inkscape, Spyder, plots and SVG compatibility (true axis size)

I have been plotting data for years during my PhD and always had to fight with something that unfortunately plagues the scientific community: negligent data manipulation. My problem is that when I ...
David M. Sousa's user avatar
0 votes
2 answers
886 views

Export matplotlib as emf and avoid black bacground fill

The previous discussion [1] helps us to export a matplotlib plot as an .emf file. However, the strange error is that the output file has nodes filled with black background as shown below. How is it ...
banbar's user avatar
  • 299
1 vote
0 answers
323 views

How to import Matplotlib Latex as text with Tex fonts in Inkscape?

I basically want to do the same thing as here, but with latex on. Is there a way of forcing Inkspace recognize Tex fonts/text when as text? matplotlib - plot outputs text as paths and cannot be ...
Jonas Kublitski's user avatar
3 votes
2 answers
3k views

Save matplotlib figures as .pdf_tex

In Inkscape, there is the possibility of saving pdf files along with generating pdf_tex files for automatic formatting into a Latex file. This can be specified by checking a box after clicking on save ...
Q.Cazères's user avatar
5 votes
1 answer
4k views

Matplotlib multiple scatter subplots - reduce svg file size

I generated a plot in Matplotlib which consists of 50 subplots. In each of these subplots I have a scatterplot with about 3000 datapoints. I'm doing this, because I just want to have an overview of ...
Frank's user avatar
  • 149
3 votes
1 answer
4k views

Is there an efficient way to store 2D plots as a vector graphic in python?

I'm currently trying to store python plots as vector graphics to improve their appearance in a latex document. For 1D plots this works quite fine: import numpy as np import matplotlib as mpl mpl.use('...
Forrest Thumb's user avatar
0 votes
1 answer
497 views

Matplotlib: line length in .svg export

I'm drawing a polygon in matplotlib and exporting it in .svg so I can use it in eg. Inkscape. I know you can specify the image size in inches, but I'd like to have a line with length "1" to be mapped ...
CyrielN's user avatar
  • 99
0 votes
0 answers
52 views

The decimal point appears as a triangle in inkscape

I am using Inkscape to merge two figures. One of the figures, created using matplotlib, has a mathematical text written over it. To the best of my understanding, the text is rendered using latex by ...
Peaceful's user avatar
  • 5,240
2 votes
0 answers
2k views

Python & Inkscape: SVG-to-EMF conversion breaks down?

I am trying to automatically convert an SVG graphic to EMF with Python, using Inkscape on the command line. My code is from subprocess import call import matplotlib.pyplot as plt from numpy import ...
rmnboss's user avatar
  • 103
1 vote
1 answer
1k views

White gradient artifacts left over after converting an SVG file to PDF

I have an SVG file of a bar plot that I need to convert to a PDF. The bar plot was made in matplotlib, saved as a PDF and imported into Inkscape. I used Inkscape to add annotations to the figure and ...
Austin Downey's user avatar
2 votes
1 answer
4k views

Change of the fontsize when saving an svg from matplotlib

i have some data that i visualize with matplotlib. The font i use is Arial and the font size should be 10. I save the diagram as svg to postprocess it in inkscape. Everything is smooth up to the point ...
ns63sr's user avatar
  • 329

15 30 50 per page