Skip to content

Commit

Permalink
Fix bug with auto limits in RV plot by forcing default ylims
Browse files Browse the repository at this point in the history
  • Loading branch information
sefffal committed Nov 20, 2024
1 parent 085756d commit 92eb9bb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ext/OctofitterMakieExt/rvtimeplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ function rvtimeplot!(
)
end

y_ax_limits = (0,0)

# CASE: no data, just plot model.
if isempty(like_objs)
@info "is empyty"
ax = Axis(
gs[1, 1];
ylabel= use_kms ? "rv [km/s]" : "rv [m/s]",
Expand Down Expand Up @@ -149,11 +149,14 @@ function rvtimeplot!(
color = concat_with_nan(color_model_t),
colorrange=(0,2pi),
colormap,
label="A",
rasterize=4,
)
y_ax_limits = extrema([y_ax_limits...; filter(isfinite, concat_with_nan(rv_star_model_t) .* kms_mult)])

end



# CASE: one or more RV likelihood objects.
# The only safe way to display these is with a separate panel per instrument
gs_row = 0
Expand Down Expand Up @@ -315,7 +318,6 @@ function rvtimeplot!(
color = concat_with_nan(color_model_t),
colorrange=(0,2pi),
colormap,
label="A",
rasterize=4,
)

Expand All @@ -340,8 +342,11 @@ function rvtimeplot!(
strokecolor=:black,
markersize=8, #1.5,
)
y_ax_limits = extrema([y_ax_limits...; filter(isfinite, concat_with_nan(rv_star_model_t) .* kms_mult); rv_data .* kms_mult])
end

ylims!(ax, y_ax_limits...)

if colorbar
Colorbar(
gs[1,2];
Expand Down

6 comments on commit 92eb9bb

@sefffal
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/119839

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v5.2.0 -m "<description of version>" 92eb9bb0b1cb5253eb5e1dc08f274e44d04cf302
git push origin v5.2.0

@sefffal
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register

Release notes:

Improved plotting

Breaking changes

  • Plots: remove planet_rv argument to octoplot. It was never documented or well supported.

New Features and Improvements

  • Plots: add dark band for GP std per draw in octoplot
  • Support plotting GPs in octoplot
  • Plots: Improve rv octo plot to show multiple panels
  • Plots: improve rvpostplot performance on large chains
  • Plots: visual improvements to rvpostplot
  • Improve Dynesty.jl integration
  • Plots: remove grid lines in rvpostplot for cleaner look
  • Plots: Centre RV phase-folded plot at zero crossing

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request updated: JuliaRegistries/General/119839

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v5.2.0 -m "<description of version>" 92eb9bb0b1cb5253eb5e1dc08f274e44d04cf302
git push origin v5.2.0

@sefffal
Copy link
Owner Author

Choose a reason for hiding this comment

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

@JuliaRegistrator register subdir=OctofitterRadialVelocity

Release notes:

Improved plotting

Breaking changes

  • Plots: remove planet_rv argument to octoplot. It was never documented or well supported.

New Features and Improvements

  • Plots: add dark band for GP std per draw in octoplot
  • Support plotting GPs in octoplot
  • Plots: Improve rv octo plot to show multiple panels
  • Plots: improve rvpostplot performance on large chains
  • Plots: visual improvements to rvpostplot
  • Improve Dynesty.jl integration
  • Plots: remove grid lines in rvpostplot for cleaner look
  • Plots: Centre RV phase-folded plot at zero crossing

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/119848

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a OctofitterRadialVelocity-v5.1.0 -m "<description of version>" 92eb9bb0b1cb5253eb5e1dc08f274e44d04cf302
git push origin OctofitterRadialVelocity-v5.1.0

Please sign in to comment.