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

Plot measurements for t = 'inf' #149

Merged
merged 21 commits into from
Nov 22, 2022
Merged

Plot measurements for t = 'inf' #149

merged 21 commits into from
Nov 22, 2022

Conversation

plakrisenko
Copy link
Member

@plakrisenko plakrisenko commented May 15, 2022

Visualization of data at t=\infty with a break in x axis.

@plakrisenko plakrisenko linked an issue May 15, 2022 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2022

Codecov Report

Merging #149 (d1dd788) into develop (2ba5c52) will increase coverage by 0.60%.
The diff coverage is 92.38%.

@@             Coverage Diff             @@
##           develop     #149      +/-   ##
===========================================
+ Coverage    77.95%   78.55%   +0.60%     
===========================================
  Files           29       29              
  Lines         2644     2742      +98     
  Branches       591      610      +19     
===========================================
+ Hits          2061     2154      +93     
- Misses         425      427       +2     
- Partials       158      161       +3     
Impacted Files Coverage Δ
petab/visualize/plotter.py 83.58% <92.30%> (+4.79%) ⬆️
petab/visualize/plotting.py 86.86% <100.00%> (+1.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@plakrisenko plakrisenko marked this pull request as ready for review November 17, 2022 12:47
Copy link
Collaborator

@PaulJonasJost PaulJonasJost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me.

Comment on lines +145 to +152
if np.inf in scond:
# remove inf point
scond = scond[:-1]
smean = smean[:-1]
snoise = snoise[:-1]

if len(scond) > 0 and len(smean) > 0 and len(snoise) > 0:
# if only t=inf there will be nothing to plot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this ensures that if only t=inf this will not be called.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If only measurements at t=inf are available, scond, smean, snoise will be empty because of the lines 145-149.

Comment on lines 486 to 497
def _split_axes_line_plot(
ax: matplotlib.axes.Axes,
plotTypeData: str,
measurements_to_plot: DataSeries,
simulations_to_plot: DataSeries,
noise_col: str,
label_base: str,
split_axes_params: dict,
color=None
) -> Tuple[matplotlib.axes.Axes, matplotlib.axes.Axes]:
"""
Plot data at t=inf.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't plot_inf_states or something be a bit more clear name then split_axes?

@plakrisenko plakrisenko merged commit 63063d2 into develop Nov 22, 2022
@dweindl dweindl deleted the plot_inf_points branch February 28, 2023 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

timepoints 'inf' should throw an error if one plots time series
4 participants