Преглед на файлове

Removes fontsize scaling

master
Lukas Prause преди 2 години
родител
ревизия
67ca4d66b0
променени са 2 файла, в които са добавени 16 реда и са изтрити 4 реда
  1. +15
    -3
      plot_gps_csv.py
  2. +1
    -1
      plot_single_transmission_EM9190.py

+ 15
- 3
plot_gps_csv.py Целия файл

import contextily as cx import contextily as cx
import matplotlib.pyplot as plt import matplotlib.pyplot as plt


import seaborn as sns

sns.set()
#sns.set(font_scale=1.5)


if __name__ == "__main__": if __name__ == "__main__":
parser = ArgumentParser() parser = ArgumentParser()
parser.add_argument("-f", "--file", required=True, help="Messfahrt csv") parser.add_argument("-f", "--file", required=True, help="Messfahrt csv")


df_wm = gdf.to_crs(epsg=3857) df_wm = gdf.to_crs(epsg=3857)
ax2 = df_wm.plot() ax2 = df_wm.plot()
ax2 = df_wm.plot(args.column, cmap="hot", legend=args.no_legend, ax=ax2)
ax2 = df_wm.plot(column=args.column, cmap="hot", legend=args.no_legend, ax=ax2, legend_kwds={"label": args.label},)
# ax2 = df_wm.plot.scatter(x="longitude", y="latitude", c="kmh", cmap="hot") # ax2 = df_wm.plot.scatter(x="longitude", y="latitude", c="kmh", cmap="hot")
# zoom 17 is pretty # zoom 17 is pretty
cx.add_basemap(ax2, source=cx.providers.OpenStreetMap.Mapnik, zoom=17) cx.add_basemap(ax2, source=cx.providers.OpenStreetMap.Mapnik, zoom=17)


# gdf.plot() # gdf.plot()
ax2.set_axis_off() ax2.set_axis_off()
ax2.set_title(args.label if args.label else args.column)
if not args.no_legend:
ax2.set_title(args.label if args.label else args.column)
else:
fig = ax2.figure
cb_ax = fig.axes[0]
cb_ax.set_label(args.label)
cb_ax.tick_params(labelsize=30)


if args.show_providerinfo: if args.show_providerinfo:
##################################### #####################################
# df.plot(x="longitude", y="latitude", kind="scatter", colormap="YlOrRd") # df.plot(x="longitude", y="latitude", kind="scatter", colormap="YlOrRd")


if args.save: if args.save:
plt.savefig("{}gps_plot.pdf".format(args.save))
plt.savefig("{}gps_plot.eps".format(args.save), bbox_inches="tight")
else: else:
plt.show() plt.show()

+ 1
- 1
plot_single_transmission_EM9190.py Целия файл

import seaborn as sns import seaborn as sns


sns.set() sns.set()
sns.set(font_scale=1.5)
#sns.set(font_scale=1.5)


tex_fonts = { tex_fonts = {
"pgf.texsystem": "lualatex", "pgf.texsystem": "lualatex",

Loading…
Отказ
Запис