From bfad4ac339ac139e5ad303170f0f7daaf135be71 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Mon, 2 Dec 2019 13:04:32 +0100 Subject: [PATCH] README for matplotlib fonts problemns --- Makefile | 3 +++ README.fonts | 23 ++++++++++++++++++ chapter.mk | 3 ++- .../lecture/pointprocessscetchA.eps | 4 +-- .../lecture/pointprocessscetchA.pdf | Bin 2790 -> 2790 bytes .../lecture/pointprocessscetchB.eps | 4 +-- .../lecture/pointprocessscetchB.pdf | Bin 4698 -> 4698 bytes 7 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 README.fonts diff --git a/Makefile b/Makefile index 0a1723b..eb38e46 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,9 @@ watchpdf : watchscript : while true; do ! make -s -q script && make script; sleep 0.5; done +cleanplots: + for sd in $(SUBDIRS); do $(MAKE) -C $$sd/lecture cleanplots; done + cleantex: rm -f *~ $(BASENAME).aux $(BASENAME).log $(BASENAME).out $(BASENAME)-solutions.tex $(BASENAME).toc $(BASENAME).lo? $(BASENAME).idx $(BASENAME)-term.i* $(BASENAME)-enterm.i* $(BASENAME)-code.i* for sd in $(SUBDIRS); do $(MAKE) -C $$sd/lecture cleantex; done diff --git a/README.fonts b/README.fonts new file mode 100644 index 0000000..83bece0 --- /dev/null +++ b/README.fonts @@ -0,0 +1,23 @@ +Fonts for matplotlib +-------------------- + +Make sure the right fonts are installed: +``` +sudo apt-get install ttf-lyx2.0 +``` +There is some conflict with `lyx` fonts, so we first remove them +and remove the matplotlib font cache: +``` +sudo dpkg --remove --force-depends fonts-lyx +rm ~/.cache/matplotlib/fontList.cache +# rm ~/.matplotlib/fontList.cache # older ubuntus +``` +Then we need to plot something to recreate the matplotlib font cache: +``` +make cleanplots +make plots +``` +To give back the fonts to lyx we reinstall them +``` +sudo apt-get install fonts-lyx +``` diff --git a/chapter.mk b/chapter.mk index e2f9044..d28642d 100644 --- a/chapter.mk +++ b/chapter.mk @@ -47,8 +47,9 @@ cleantex: rm -f $(BASENAME).aux $(BASENAME).log rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out $(BASENAME)-chapter.idx $(BASENAME)-solutions.tex $(BASENAME)-solutions.tex +cleanplots: cleanpythonplots cleangnuplots -cleanchapter : cleanpythonplots cleangnuplots cleantex +cleanchapter : cleanplots cleantex cleanallchapter : cleanchapter diff --git a/pointprocesses/lecture/pointprocessscetchA.eps b/pointprocesses/lecture/pointprocessscetchA.eps index 9062460..15bfb45 100644 --- a/pointprocesses/lecture/pointprocessscetchA.eps +++ b/pointprocesses/lecture/pointprocessscetchA.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchA.tex %%Creator: gnuplot 4.6 patchlevel 4 -%%CreationDate: Mon Dec 2 10:40:01 2019 +%%CreationDate: Mon Dec 2 13:03:15 2019 %%DocumentFonts: %%BoundingBox: 50 50 373 135 %%EndComments @@ -433,7 +433,7 @@ SDict begin [ /Author (benda) % /Producer (gnuplot) % /Keywords () - /CreationDate (Mon Dec 2 10:40:01 2019) + /CreationDate (Mon Dec 2 13:03:15 2019) /DOCINFO pdfmark end } ifelse diff --git a/pointprocesses/lecture/pointprocessscetchA.pdf b/pointprocesses/lecture/pointprocessscetchA.pdf index b3f922b89fa1fa9c9e7430195f2ad67c890bbcb1..afb0114e01cdaf83ecdb97f885ffa871b3163b71 100644 GIT binary patch delta 227 zcmaDR`b>1gF=if9Lvu4DV?$k&6hn*20c`SdPCm1gF=ig4#3X~{lw@6#6a$mV0c`SilN110bcpZsodGjz<@em^_(R6w0bcpZsodGjz<@em^_(R6+jEKM!V9nIY=jV$bJ2&tHCFC+~BjRrd8