From d1555091b43c4678ea7c1e0a59b853db972f4532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 27 May 2020 10:26:59 +0300 Subject: [PATCH] generate rectangle --- II/Referatas/Makefile | 3 +++ II/Referatas/layer2img.py | 5 ++++- II/Referatas/mj-referatas.tex | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/II/Referatas/Makefile b/II/Referatas/Makefile index b6ec0d4..74dba76 100644 --- a/II/Referatas/Makefile +++ b/II/Referatas/Makefile @@ -37,6 +37,9 @@ $(eval $(call gpkg2pdf,zeimena,crossing,--size=105x74 --clip $(CROSSING))) sinewave.gpkg: fig2layer.py ./fig2layer.py -o $@ sine +rectangle.gpkg: fig2layer.py + ./fig2layer.py -o $@ rectangle --bounds $(CROSSING) + db/.faux_ready: zeimena.gpkg sinewave.gpkg managedb -./managedb stop; rm -fr db ./managedb init diff --git a/II/Referatas/layer2img.py b/II/Referatas/layer2img.py index 9d9b2b0..0a0408c 100755 --- a/II/Referatas/layer2img.py +++ b/II/Referatas/layer2img.py @@ -5,7 +5,8 @@ import argparse import geopandas import psycopg2 import matplotlib.pyplot as plt -import matplotlib.patches as patches + +from matplotlib import rc, patches INCH = 25.4 # mm BOUNDS = ('xmin', 'ymin', 'xmax', 'ymax') @@ -45,6 +46,8 @@ def main(): f = geopandas.read_postgis(sql, con=conn, geom_col='geom') else: f = geopandas.read_file(args.infile) + + rc('text', usetex=True) fig, ax = plt.subplots() if args.size: fig.set_size_inches(args.size) diff --git a/II/Referatas/mj-referatas.tex b/II/Referatas/mj-referatas.tex index f6fd3b2..fa1409c 100644 --- a/II/Referatas/mj-referatas.tex +++ b/II/Referatas/mj-referatas.tex @@ -83,6 +83,7 @@ Zeimena extents: [606922,6097557,627230,6126362] \vspace{10mm} Version: \VCDescribe \\ \vspace{4mm} Generated At: \GeneratedAt + } \begin{document}