Przeglądaj źródła

Adds pdf export.

master
Lukas Prause 3 lat temu
rodzic
commit
6e4b0a3466
1 zmienionych plików z 6 dodań i 1 usunięć
  1. +6
    -1
      plot_gps.py

+ 6
- 1
plot_gps.py Wyświetl plik

@@ -54,6 +54,7 @@ if __name__ == "__main__":
parser.add_argument("-a", "--column", required=True, help="Column to plot")
parser.add_argument("-l", "--label", help="Label above the plot.")
parser.add_argument("--no_legend", action="store_false", default=True, help="Do not show legend.")
parser.add_argument("--save", default=None, help="Location to save pdf file.")

parser.add_argument(
"--show_providerinfo",
@@ -205,4 +206,8 @@ if __name__ == "__main__":
#####################################

# df.plot(x="longitude", y="latitude", kind="scatter", colormap="YlOrRd")
plt.show()

if args.save:
plt.savefig("{}gps_plot.pdf".format(args.save))
else:
plt.show()

Ładowanie…
Anuluj
Zapisz