Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Support native PDF LaTeX export #63

Closed
jgonsior opened this issue Apr 16, 2020 · 4 comments
Closed

Support native PDF LaTeX export #63

jgonsior opened this issue Apr 16, 2020 · 4 comments

Comments

@jgonsior
Copy link

Currently I use the inkscape -D -z --file input.svg --export-pdf output.pdf_tex --export-latex to create a PDF file that can be imported into LaTeX and uses the fonts etc. from LaTeX. But I have to manually escape f.e. the percentage signs from the axis or fiddle around quite a lot to make the paddings etc. work. Therefore I'd like to know, if a native latex PDF LaTeX export is on the table for the future.

@taralloc
Copy link

As a very basic workaround for the font, you can install the Computer Modern font from here and then use it in your Altair code with something like labelFont='CMU Serif'.

@AirManH
Copy link

AirManH commented Feb 6, 2021

AFAIK, matplotlib support exporting plots to latex like:

plt.savefig('figure.pdf', backend='pgf')

I often have to insert plots in latex, and if you could provide similar feature, this will become an advantage of alrair. :)

@jakevdp
Copy link
Member

jakevdp commented Feb 8, 2021

If that feature is important to you, I’d suggest sticking with matplotlib.

@joelostblom
Copy link
Member

Since Altair 5.2, the functionality of Altair Saver is now available in Altair via the vl-convert package. Most of the functionality has been available since 5.0, and the main addition in 5.2 was PDF export. See the docs on how to save charts for more details.

We are going to archive this repo, so I'm closing all the open issues and PRs before doing so. Try out the new options for saving charts mentioned above and if you run into issues, please open an issue directly in the altair or vl-convert repo.

@joelostblom joelostblom closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants