Skip to content

Commit

Permalink
Change species_list param
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak-dv committed Jul 8, 2024
1 parent f20777d commit 3911ddf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions docs/io/visualization/how_to_liv_plot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_mpl(species_list=species_list)"
"plotter.generate_plot_mpl(species_list)"
]
},
{
Expand All @@ -137,7 +137,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_mpl(packets_mode=\"real\", species_list=species_list)"
"plotter.generate_plot_mpl(species_list, packets_mode=\"real\")"
]
},
{
Expand All @@ -154,7 +154,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_mpl(species_list=species_list, num_bins=20)"
"plotter.generate_plot_mpl(species_list, num_bins=20)"
]
},
{
Expand All @@ -171,7 +171,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_mpl(species_list=species_list, log_scale=True)"
"plotter.generate_plot_mpl(species_list, log_scale=True)"
]
},
{
Expand All @@ -188,7 +188,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_mpl(species_list=species_list, velocity_range=(12500, 15050))"
"plotter.generate_plot_mpl(species_list, velocity_range=(12500, 15050))"
]
},
{
Expand Down Expand Up @@ -237,7 +237,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_ply(species_list=species_list, figsize=(1000, 500))"
"plotter.generate_plot_ply(species_list, figsize=(1000, 500))"
]
},
{
Expand All @@ -253,7 +253,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_ply(packets_mode=\"real\", species_list=species_list)"
"plotter.generate_plot_ply(species_list, packets_mode=\"real\")"
]
},
{
Expand All @@ -270,7 +270,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_ply(species_list=species_list, num_bins=10)"
"plotter.generate_plot_ply(species_list, num_bins=10)"
]
},
{
Expand All @@ -287,7 +287,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_ply(species_list=species_list, log_scale=True)"
"plotter.generate_plot_ply(species_list, log_scale=True)"
]
},
{
Expand All @@ -304,7 +304,7 @@
"metadata": {},
"outputs": [],
"source": [
"plotter.generate_plot_ply(species_list=species_list, velocity_range=[12500, 15050])"
"plotter.generate_plot_ply(species_list, velocity_range=(12500, 15050))"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions tardis/visualization/tools/liv_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ def _prepare_plot_data(

def generate_plot_mpl(
self,
species_list,
packets_mode="virtual",
ax=None,
figsize=(11, 5),
cmapname="jet",
species_list=[],
log_scale=False,
num_bins=None,
velocity_range=None,
Expand All @@ -296,6 +296,8 @@ def generate_plot_mpl(
Parameters
----------
species_list : list of str
List of species to plot.
packets_mode : str, optional
Packet mode, either 'virtual' or 'real'. Default is 'virtual'.
ax : matplotlib.axes.Axes, optional
Expand All @@ -304,8 +306,6 @@ def generate_plot_mpl(
Size of the figure. Default is (11, 5).
cmapname : str, optional
Colormap name. Default is 'jet'. A specific colormap can be chosen, such as "jet", "viridis", "plasma", etc.
species_list : list of str
List of species to plot.
log_scale : bool, optional
If True, both axes are scaled logarithmically. Default is False.
num_bins : int, optional
Expand Down Expand Up @@ -360,11 +360,11 @@ def generate_plot_mpl(

def generate_plot_ply(
self,
species_list,
packets_mode="virtual",
fig=None,
figsize=(1000, 500),
cmapname="jet",
species_list=[],
log_scale=False,
num_bins=None,
velocity_range=None,
Expand All @@ -374,6 +374,8 @@ def generate_plot_ply(
Parameters
----------
species_list : list of str
List of species to plot.
packets_mode : str, optional
Packet mode, either 'virtual' or 'real'. Default is 'virtual'.
fig : plotly.graph_objects.Figure, optional
Expand All @@ -382,8 +384,6 @@ def generate_plot_ply(
Size of the figure. Default is (1000, 500).
cmapname : str, optional
Colormap name. Default is 'jet'. A specific colormap can be chosen, such as "jet", "viridis", "plasma", etc.
species_list : list of str
List of species to plot.
log_scale : bool, optional
If True, both axes are scaled logarithmically. Default is False.
num_bins : int, optional
Expand Down

0 comments on commit 3911ddf

Please sign in to comment.