Skip to content

Commit 56311e7

Browse files
authored
CLI plot default hotfix (#38)
1 parent 5b080c9 commit 56311e7

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

CHANGELOG.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable changes to this project will be documented in this file.
66
The format is based on `Keep a Changelog`_,
77
and this project adheres to `Semantic Versioning`_.
88

9+
`1.4.8`_ - 2021-05-13
10+
--------------------------
11+
Fixed
12+
'''''''
13+
- Default behavior of ``cli.plot_*`` functions when ``plot_files`` is not
14+
specified.
15+
916
`1.4.7`_ - 2021-02-07
1017
--------------------------
1118
Changed
@@ -218,7 +225,8 @@ Added
218225

219226
.. LINKS
220227
221-
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.7...HEAD
228+
.. _`Unreleased`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.8...HEAD
229+
.. _`1.4.8`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.7...v1.4.8
222230
.. _`1.4.7`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.6...v1.4.7
223231
.. _`1.4.6`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.5...v1.4.6
224232
.. _`1.4.5`: https://github.com/kip-hart/MicroStructPy/compare/v1.4.4...v1.4.5

LICENSE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2020 Georgia Tech Research Corporation
3+
Copyright (c) 2019-2021 Georgia Tech Research Corporation
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# -- Project information -----------------------------------------------------
2626

2727
project = 'MicroStructPy'
28-
copyright = '2019-2020, Georgia Tech Research Corporation'
28+
copyright = '2019-2021, Georgia Tech Research Corporation'
2929
author = 'Kenneth Hart'
3030

3131
# The short X.Y version

src/microstructpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
import microstructpy.seeding
55
import microstructpy.verification
66

7-
__version__ = '1.4.7'
7+
__version__ = '1.4.8'

src/microstructpy/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def plot_seeds(seeds, phases, domain, plot_files=[], plot_axes=True,
645645
for more details.
646646
domain (from :mod:`microstructpy.geometry`): Domain geometry.
647647
plot_files (list): *(optional)* List of files to save the output plot.
648-
Defaults to saving the plot to ``polymesh.png``.
648+
Defaults to saving the plot to ``seeds.png``.
649649
plot_axes (bool): *(optional)* Flag to turn the axes on or off.
650650
True shows the axes, False removes them. Defaults to True.
651651
color_by (str): *(optional)* {'material' | 'seed number' |
@@ -660,7 +660,7 @@ def plot_seeds(seeds, phases, domain, plot_files=[], plot_axes=True,
660660
661661
"""
662662
if not plot_files:
663-
return
663+
plot_files = ['seeds.png']
664664

665665
phase_names = []
666666
given_names = False
@@ -778,7 +778,7 @@ def plot_poly(pmesh, phases, plot_files=['polymesh.png'], plot_axes=True,
778778
779779
"""
780780
if not plot_files:
781-
return
781+
plot_files = ['polymesh.png']
782782

783783
n_dim = len(pmesh.points[0])
784784

@@ -897,7 +897,7 @@ def plot_tri(tmesh, phases, seeds, pmesh, plot_files=[], plot_axes=True,
897897
seeds (SeedList): List of seed geometries.
898898
pmesh (PolyMesh): Polygonal mesh from which ``tmesh`` was generated.
899899
plot_files (list): *(optional)* List of files to save the output plot.
900-
Defaults to saving the plot to ``polymesh.png``.
900+
Defaults to saving the plot to ``trimesh.png``.
901901
plot_axes (bool): *(optional)* Flag to turn the axes on or off.
902902
True shows the axes, False removes them. Defaults to True.
903903
color_by (str): *(optional)* {'material' | 'seed number' |
@@ -912,7 +912,7 @@ def plot_tri(tmesh, phases, seeds, pmesh, plot_files=[], plot_axes=True,
912912
913913
"""
914914
if not plot_files:
915-
return
915+
plot_files = ['trimesh.png']
916916

917917
n_dim = len(tmesh.points[0])
918918

0 commit comments

Comments
 (0)