Skip to content

Commit

Permalink
Add ProxyDatabase.plotly_concise()
Browse files Browse the repository at this point in the history
  • Loading branch information
fzhu2e committed Jan 15, 2024
1 parent 989613d commit ab50004
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
26 changes: 13 additions & 13 deletions cfr/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,19 +1439,19 @@ def plot(self, **kws):
return fig, ax


# def plotly(self, **kwargs):
# ''' Plot the database on an interactive map utilizing Plotly
# '''
# df = self.to_df()
# fig = px.scatter_geo(
# df, lat='lat', lon='lon',
# color='ptype',
# hover_name='pid',
# projection='natural earth',
# **kwargs,
# )

# return fig
def plotly_concise(self, **kwargs):
''' Plot the database on an interactive map utilizing Plotly
'''
df = self.to_df()
fig = px.scatter_geo(
df, lat='lat', lon='lon',
color='ptype',
hover_name='pid',
projection='natural earth',
**kwargs,
)

return fig


def plotly(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion cfr/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def count_time(df,lgd_ncol=None, type_col="ptype", year=np.arange(2001),time_col

return proxy_count_all,color_discrete_sequence

def plotly_proxies(df):
def plotly_proxies(df, p=STYLE):
"""
Visualize proxies.
Args:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='cfr', # required
version='2024.1.2',
version='2024.1.15',
description='cfr: a Python package for Climate Field Reconstruction',
long_description=long_description,
long_description_content_type='text/x-rst',
Expand Down

0 comments on commit ab50004

Please sign in to comment.