File tree 3 files changed +11
-19
lines changed
3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ resulting visualizations and use the editor tool `on this website
14
14
<https://bids.github.io/colormap/> `_.
15
15
16
16
Downloads:
17
- https://pypi.python.org/pypi/viscm/
17
+ * https://pypi.python.org/pypi/viscm/
18
+ * https://anaconda.org/conda-forge/viscm/
18
19
19
20
Code and bug tracker:
20
21
https://github.com/matplotlib/viscm
@@ -29,4 +30,4 @@ Dependencies:
29
30
* NumPy
30
31
31
32
License:
32
- MIT, see LICENSE.txt for details.
33
+ MIT, see ` LICENSE < LICENSE >`__ for details.
Original file line number Diff line number Diff line change 2
2
3
3
import matplotlib .pyplot as plt
4
4
5
- from . import gui
5
+ from viscm import gui
6
6
7
7
8
8
def cli ():
9
9
import argparse
10
10
argv = sys .argv [1 :]
11
11
12
- # Usage:
13
- # python -m viscm
14
- # python -m viscm edit
15
- # python -m viscm edit <file.py>
16
- # (file.py must define some appropriate globals)
17
- # python -m viscm view <file.py>
18
- # (file.py must define a global named "test_cm")
19
- # python -m viscm view "matplotlib builtin colormap"
20
- # python -m viscm view --save=foo.png ...
21
-
22
12
parser = argparse .ArgumentParser (
23
13
prog = "python -m viscm" ,
24
14
description = "A colormap tool." ,
@@ -30,8 +20,9 @@ def cli():
30
20
nargs = "?" )
31
21
parser .add_argument ("colormap" , metavar = "COLORMAP" ,
32
22
default = None ,
33
- help = "A .json file saved from the editor, or "
34
- "the name of a matplotlib builtin colormap" ,
23
+ help = "A .json file saved from the editor, a .py file containing"
24
+ " a global named `test_cm`, or the name of a matplotlib"
25
+ " builtin colormap" ,
35
26
nargs = "?" )
36
27
parser .add_argument ("--uniform-space" , metavar = "SPACE" ,
37
28
default = "CAM02-UCS" ,
@@ -109,3 +100,7 @@ def cli():
109
100
signal .signal (signal .SIGINT , signal .SIG_DFL )
110
101
111
102
app .exec_ ()
103
+
104
+
105
+ if __name__ == "__main__" :
106
+ cli ()
Original file line number Diff line number Diff line change @@ -1225,7 +1225,3 @@ def loadviewer(self):
1225
1225
newwindow .resize (800 , 600 )
1226
1226
1227
1227
newwindow .show ()
1228
-
1229
-
1230
- if __name__ == "__main__" :
1231
- main ()
You can’t perform that action at this time.
0 commit comments