![]() ![]() The finishing touch was to set the savefig.facecolor to the off white background of the metropolis theme. I could also alter the rcParams such that all text was set in the mDarkTeal colour. I’d become aware of the LaTeX package FiraSans, and figured I could add this into the rcParam to match my fonts between metropolis and matplotlib. Oh well… An actual solutionĪha, and here our rollercoaster ride rolls into a satisfying matplotlib-based ending. As it happens my naivety had misled me, and I quickly ran into memory problems with matplotlib2tikz. ![]() With this, I’d hoped that the memory consumption of the resulting plots would be more reasonable than those rendered with the pgf backend. Here though, the plots are saved as TikZ commands, which is a higher level language than pgf. The idea behind matplotlib2tikz is similar to that of the pgf backend. I figured this would be a good time to give it a look in. ![]() I’d heard whisperings about the matplotlib2tikz package on my jaunts over at Stack Overflow, but I’d never had reason to use it ( shameless SO plug). I was hoping for a pure matplotlib solution. Still, though, my work machine doesn’t have a luaLaTeX build, and I didn’t want to start messing around with pdfLaTeX’s memory limit. Another solution would be to compile with luaLaTeX, which can dynamically alter its memory limit as needed. If you’re compiling with pdfLaTeX one solution is to increase the main memory limit. This memory issue isn’t a huge problem, and there are ways around it. A particular problem is the amount of memory plots rendered this way consume, this becomes more acute once a reasonable number of elements are included in the plot. I think the pgf backend of matplotlib is great, but rendering plots this way does have its drawbacks. The upshot? All the fonts will be set as in the metropolis theme: in an mDarkTeal FiraSans font.Įasy right? Well, almost. Using this backend, the drawing commands of the plots can be inserted directly into the presentation. Matplotlib provides a pgf backend, which allows plots to be exported as pgf drawing commands (if you’re brave enough and want to learn more about pgf, you can check out the pgf/TikZ manual which sits at a pretty 1247 pages). There are many things I can live with, but poorly integrated graphics in a research presentation isn’t one of them. ![]() My figures had a white facecolor, which meant all the plots I’d included had a white box around them. I was also distressed by the off-white background of the metropolis slides. Yet, metropolis sets text in a colour it calls mDarkTeal. The fonts in my plots were serif, yet metropolis was using a sans-serif font. By themselves the figures looked good, but once inserted into the presentation they clashed with the metropolis theme. This was until I paid more attention to the figures I’d included. The presentation was coming along well, and in my own biased opinion I thought the presentation had a certain aesthetic charm. Recently, I was busy creating a presentation with beamer and the metropolis theme. Metropolis is a modern Beamer theme which looks minimal, stylish and professional, and has become my go-to beamer theme. The default themes look cluttered, clunky and out of date. Beamer is actually just a LaTeX document class, so its syntax and setup is familiar to those who have experience working with TeX and friends.ĭespite Beamer’s popularity in industry and academia, the default theme options are, to put it politely, lacking. It's more fun to compute Matplotlib graphics for the metropolis beamer theme | It’s more fun to compute It's more fun to compute Thoughts on maths and computing Blog Talks Teaching CV About Matplotlib graphics for the metropolis beamer themeīeamer is a great tool to make presentations with, and is indispensable to those who need to typeset mathematics within their slides. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |