Skip to content

Commit

Permalink
New colorbar range for 3d scatter plot
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMarco27 committed Jan 10, 2022
1 parent 20863e7 commit 9d8b2bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion GitMarco/graphics/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ def plot(self,
n_ticks: int = 10,
margin=None,
alpha: float = 0.8,
show: bool = False):
show: bool = False,
cmin: float = 0.,
cmax: float = 1.):
"""
:param cmax: maximum value of the colorbar
:param cmin: minimum value of the colorbar
:param alpha: alpha
:param margin: scene margins
:param n_ticks: number of ticks on every axis
Expand Down Expand Up @@ -71,6 +75,8 @@ def plot(self,
colorscale='Turbo',
opacity=alpha,
colorbar=dict(thickness=20),
cmin=cmin,
cmax=cmax,
# line=dict(width=0.5,
# color='black')
))],
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
'GitMarco.graphics',
'GitMarco.torch',
'GitMarco.notebooks'], # Chose the same as "name"
version='v0.0.10', # Start with a small number and increase it with every change you make
version='v0.0.11', # Start with a small number and increase it with every change you make
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
description='An Engineering, Data Science and Deep Learning python package', # Give a short description about your library
author='Marco Sanguineti', # Type in your name
author_email='[email protected]', # Type in your E-Mail
url='https://github.com/GitMarco27/GitMarco', # Provide either the link to your github or to your website
download_url='https://github.com/GitMarco27/GitMarco/archive/refs/tags/v0.0.10.tar.gz', # I explain this later on
download_url='https://github.com/GitMarco27/GitMarco/archive/refs/tags/v0.0.11.tar.gz', # I explain this later on
keywords=['DeepLearning', 'DataScience', 'GitMarco'], # Keywords that define your package best
install_requires=[ # I get to this in a second
'pysolar',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_scatter_3d():
plot = Scatter3D(x=x,
y=y,
z=z,)
fig = plot.plot(show=False, color=z)
fig = plot.plot(show=False, color=z, cmax=10)


def test_validation_plot():
Expand Down

0 comments on commit 9d8b2bb

Please sign in to comment.