diff --git a/plot_gps.py b/plot_gps.py index e25234d..df63bec 100755 --- a/plot_gps.py +++ b/plot_gps.py @@ -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()