Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSuggested edits to visualize.py #40
Open
Conversation
Feature/visualization
Added keyword arguments to control plot properties, added separate mechanism labels, changed default values
Added hoverinfo functions for mechanism labels and vertices, added "title" keyword argument, implemented cosmetic changes to code
Formatted code with black
Substituted `edge_figure` (generated with px.line3d() function) with `edges_trace`(generated with go.Scatter3d() function) for consistency with other trace generation and possibility to manipulate trace.
Substituted initialization of figure_data as list with initialization of figure as plotly figure object. Added traces and layout to figure with appropriate plotly function.
Used magic underscore to define scene axes
Added UMAP axes labels
Changed trace names
Modified vertex_sizes function to make it work for both mechanisms and purviews
Added chunk_list function to chunk a list
Added keyword arguments to plot_relations function
Modified axes and layout
Added renames labels_mechanisms_trace and added vertices_mechanisms_trace to show mechanisms as third marker between cause and effect vertices
Added functions label_state and label_two_relation
Replaces label_two_relation() with hovertext_relation()
Added def label_relation() function
Edited label_relation() and hovertext_relation() functions
Added 2-relations (edges) as individual traces, added 2-relation hover labels, grouped all traces in a single legend-group to show/hide together
Renamed vertex_sizes() function to normalize_sizes() since applicable to edges and triangles too.
Rounded phis to 4 decimals, added 2-relation phis as edge width normalized based on corresponding kwarg, adjusted default args.
Plotting triangles as separate traces
Added 3-Relations hover label, added hoverlabel for mechanism and purview labels, formatted with black
Changed n to r for relation index
Added save digraph function, added digraph plot, formatted code
Added option to use distinction orders as z values
Renamed `plot_relations()` to `plot_ces()`
Added function `get_edge_color()` for two relations based on type of overlap
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
matteograsso commentedJul 6, 2020
Added keyword arguments to control plot properties, added separate mechanism labels, changed default values