Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

Commit

Permalink
added vmin and vmax arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnork committed Oct 6, 2018
1 parent 22234b8 commit 31ddee8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion combination_triangles_plot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ def attach_args(parser):
'--label-ur-y', action='store', type=float, metavar='LABEL_UR_Y', default=-3.5,
help='Y position of upper right (ur) label.'
)
parser.add_argument(
'--vmin', action='store', type=float, metavar='VMIN',
help='Scale minimum. Default is the minimum value across all plots.'
)
parser.add_argument(
'--vmax', action='store', type=float, metavar='VMAX',
help='Scale maximum. Default is the maximum value across all plots.'
)


def main():
Expand All @@ -96,7 +104,9 @@ def run(
label_ll_x,
label_ll_y,
label_ur_x,
label_ur_y
label_ur_y,
vmin,
vmax
):
if len(tick_separator) > 1:
raise Exception('expected single character as TICK_SEPARATOR')
Expand Down Expand Up @@ -124,6 +134,12 @@ def run(
vmin_total = min(min_lower, min_upper, vmin_total)
vmax_total = max(max_lower, max_upper, vmax_total)

if vmin is not None:
vmin_total = vmin

if vmax is not None:
vmax_total = vmax

center = 0
cmap = 'RdBu'
if vmin_total >= 0:
Expand Down
2 changes: 1 addition & 1 deletion combination_triangles_plot/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '0.1'
VERSION = '0.2'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "combination-triangles-plot"
version = "0.1"
version = "0.2"
authors = ["Christoph Jansen <Christoph.Jansen@htw-berlin.de>"]
license = "AGPL-3.0"
readme = "README.md"
Expand Down

0 comments on commit 31ddee8

Please sign in to comment.