Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
HyperLoom
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
ADAS
HyperLoom
Commits
078f33ac
Commit
078f33ac
authored
Oct 21, 2016
by
Stanislav Bohm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: --write-graph option for rview
parent
52e79ea2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
src/rview/rview.py
src/rview/rview.py
+14
-1
No files found.
src/rview/rview.py
View file @
078f33ac
...
...
@@ -22,6 +22,9 @@ def parse_args():
parser
.
add_argument
(
"--show-graph"
,
action
=
"store_true"
)
parser
.
add_argument
(
"--write-graph"
,
metavar
=
"FILENAME"
)
parser
.
add_argument
(
"--show-trace"
,
action
=
"store_true"
)
...
...
@@ -43,6 +46,12 @@ def show_graph(report):
run_program
((
"xdot"
,
"-"
),
dot
)
def
write_graph
(
report
,
filename
):
dot
=
report
.
create_graph
()
.
make_dot
(
"Plan"
)
with
open
(
filename
,
"w"
)
as
f
:
f
.
write
(
dot
)
def
show_trace
(
report
):
plt
.
ion
()
plt
.
gca
()
.
invert_yaxis
()
...
...
@@ -69,12 +78,16 @@ def main():
empty
=
False
show_graph
(
report
)
if
args
.
write_graph
:
empty
=
False
write_graph
(
report
,
args
.
write_graph
)
if
args
.
show_trace
:
empty
=
False
show_trace
(
report
)
if
empty
:
sys
.
stderr
.
write
(
"No operation specified
\n
"
)
sys
.
stderr
.
write
(
"No operation specified
(use --help)
\n
"
)
if
__name__
==
"__main__"
:
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment