def test_map_plot_with_points(): """Test as simple map plot with underlying points.""" mysurf = RegularSurface() mysurf.from_file(SFILE1) mypoints = Points() mypoints.from_surface(mysurf) df = mypoints.dataframe.copy() df = df[::20] mypoints.dataframe = df # just make the instance, with a lot of defaults behind the scene myplot = Map() myplot.canvas(title="My o my") myplot.colormap = "gist_ncar" myplot.plot_surface(mysurf) myplot.plot_points(mypoints) myplot.savefig("TMP/map_with_points.png")
def test_more_features_plot(tmpdir, generate_plot): """Map with some more features added, such as label rotation.""" mysurf = RegularSurface() mysurf.from_file(SFILE1) myfaults = Polygons(PFILE1) # just make the instance, with a lot of defaults behind the scene myplot = Map() myplot.canvas(title="Label rotation") myplot.colormap = "rainbow" myplot.plot_surface(mysurf, minvalue=1250, maxvalue=2200, xlabelrotation=45) myplot.plot_faults(myfaults) if generate_plot: myplot.savefig(join(tmpdir, "map_more1.png"))