Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable 3D quivers, scatters and streamtube in dynamo #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ipykernel>=5.1.0
nbsphinx>=0.8.6
pygments>=2.6.1

numpy>=1.18.1
numpy>=1.20.0
pandas>=0.25.1
scipy>=1.0
scikit-learn>=0.19.1
Expand Down
17 changes: 10 additions & 7 deletions docs/source/API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,21 +241,24 @@ Vector field (vf)
vf.diffusionMatrix


*Vector field graph*

.. autosummary::
:toctree: _autosummary

vf.vfGraph

Prediction (pd)
~~~~~~~~~~~~~~~

.. autosummary::
:toctree: _autosummary


*Vector field lineage fate*

pd.fate
pd.fate_bias


*Vector field state graph*

.. autosummary::
:toctree: _autosummary

pd.state_graph

Plotting (pl)
Expand Down
15 changes: 7 additions & 8 deletions dynamo/plot/scVectorField.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def cell_wise_vectors_3d(
save_kwargs: dict = {},
quiver_3d_kwargs: dict = {
"zorder": 3,
"length": 2,
"linewidth": 5,
"arrow_length_ratio": 5,
"length": 10,
"linewidth": 1,
"arrow_length_ratio": 0.3,
"norm": cm.colors.Normalize(),
"cmap": cm.PRGn,
},
Expand Down Expand Up @@ -292,7 +292,7 @@ def add_axis_label(ax, labels):
elif save_show_or_return == "show":
plt.show()
elif save_show_or_return == "return":
return axes
return axes, (x0, x1, x2, v0, v1, v2)


def grid_vectors_3d():
Expand Down Expand Up @@ -1687,10 +1687,9 @@ def streamplot_2d(ax):
set_arrow_alpha(ax, streamline_alpha)
set_stream_line_alpha(s, streamline_alpha)

if type(axes_list) == list:
for i in range(len(axes_list)):
ax = axes_list[i]
streamplot_2d(ax)
for i in range(len(axes_list)):
ax = axes_list[i]
streamplot_2d(ax)

if save_show_or_return == "save":
s_kwargs = {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ keywords = 'dynamo scslam-seq scrna-seq velocity rna protein vector-field potent
license = 'BSD'
module = 'dynamo'
requires = [
'numpy>=1.18.1',
'numpy>=1.20.0',
'pandas>=0.25.1',
'scipy>=1.0',
'scikit-learn>=0.19.1',
Expand Down