diff --git a/pysegcnn/plot/class_distribution.py b/pysegcnn/plot/class_distribution.py index 1d9da16538ded9617998c1637bc78269c69d258e..3c93fc3bcb769a5b65b11b602922e52f5691b004 100644 --- a/pysegcnn/plot/class_distribution.py +++ b/pysegcnn/plot/class_distribution.py @@ -22,7 +22,7 @@ from pysegcnn.core.trainer import DatasetConfig from pysegcnn.core.graphics import plot_class_distribution from pysegcnn.core.logging import log_conf from pysegcnn.plot.plot_config import (PLOT_PATH, BANDS, FIGSIZE, ALPHA, - DATASETS, DPI) + DATASETS) if __name__ == '__main__': @@ -42,5 +42,5 @@ if __name__ == '__main__': fig = plot_class_distribution(ds, FIGSIZE, ALPHA) # save figure - filename = PLOT_PATH.joinpath('{}_sdist.png'.format(name)) - fig.savefig(filename, dpi=DPI, bbox_inches='tight') + filename = PLOT_PATH.joinpath('{}_sdist.pdf'.format(name)) + fig.savefig(filename, bbox_inches='tight') diff --git a/pysegcnn/plot/composites.py b/pysegcnn/plot/composites.py index 6a937bd525b95063f8577b7598664e86ad285f71..c9366591bd86b4d9c6f9aa6c1252dc947d4804c9 100644 --- a/pysegcnn/plot/composites.py +++ b/pysegcnn/plot/composites.py @@ -23,7 +23,7 @@ from pysegcnn.core.trainer import DatasetConfig from pysegcnn.core.graphics import plot_sample from pysegcnn.core.logging import log_conf from pysegcnn.plot.plot_config import (PLOT_PATH, BANDS, FIGSIZE, ALPHA, - DATASETS, PLOT_BANDS, DPI) + DATASETS, PLOT_BANDS) # module level logger LOGGER = logging.getLogger(__name__) @@ -57,5 +57,5 @@ if __name__ == '__main__': alpha=ALPHA, figsize=FIGSIZE) # save the figure - fig.savefig(PLOT_PATH.joinpath('.'.join([scene_id, 'png'])), - dpi=DPI, bbox_inches='tight') + fig.savefig(PLOT_PATH.joinpath('.'.join([scene_id, 'pdf'])), + bbox_inches='tight') diff --git a/pysegcnn/plot/plot_config.py b/pysegcnn/plot/plot_config.py index b6a0c371ce9aff5f10645d5547806778f359fbad..256200326b575bcba86d7bfed8e0ea58b56514a3 100644 --- a/pysegcnn/plot/plot_config.py +++ b/pysegcnn/plot/plot_config.py @@ -29,8 +29,8 @@ if not PLOT_PATH.exists(): # path to the datasets on the current machine # DRIVE_PATH = pathlib.Path('C:/Eurac/Projects/CCISNOW/Datasets/') -# DRIVE_PATH = pathlib.Path('F:/Studium/SS 2020/Datasets/') -DRIVE_PATH = pathlib.Path('/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/Datasets') # nopep8 +DRIVE_PATH = pathlib.Path('F:/Studium/SS 2020/Datasets/') +# DRIVE_PATH = pathlib.Path('/mnt/CEPH_PROJECTS/cci_snow/dfrisinghelli/Datasets') # nopep8 # DRIVE_PATH = pathlib.Path('/home/dfrisinghelli/Datasets') # name and paths to the datasets @@ -42,15 +42,14 @@ DATASETS = {'Sparcs': {'root_dir': DRIVE_PATH.joinpath('Sparcs'), 'merge_labels': {'Cirrus': 'Cloud', 'Not_used': 'No_data'}, 'gt_pattern': '(.*)Labels\\.tif'} - } + } # spectral bands to plot distribution BANDS = ['blue', 'green', 'red', 'nir', 'swir1', 'swir2'] # plot parameters -FIGSIZE = (16, 9) +FIGSIZE = (10, 10) ALPHA = 0.5 -DPI = 300 # natural with atmospheric removal PLOT_BANDS = ['swir2', 'nir', 'green']