Skip to content

Commit

Permalink
Merge pull request #25 from MineralsCloud:EnergyEquation
Browse files Browse the repository at this point in the history
Deprecate adding the lowest point in `plot` for `EnergyEquation`
  • Loading branch information
singularitti authored Sep 8, 2023
2 parents 49f077f + a8f4888 commit ee3e177
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/EquationOfStateRecipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,7 @@ plot

@recipe function f(eos::EnergyEquation, volumes=eos.param.v0 .* (0.5:0.01:1.1))
energies = map(eos, volumes)
min, index = findmin(energies)
xguide --> "volume" # We have to add this since `Volumes` & `Energies` are not the last to return.
yguide --> "energy"
# We have to add the curves before the scatter, so that the labels and colors are followed correctly.
@series begin
seriestype --> :path
Volumes(volumes), Energies(energies)
end
@series begin # The scatter is not a primary series, so it won't be included in the legend.
primary := false # See https://discourse.julialang.org/t/what-does-the-primary-attribute-do-and-how-to-plot-curves-with-scatters-added-onto-it-in-plots-jl/93486/2
seriestype --> :scatter
markersize --> 1.25 * get(plotattributes, :linewidth, 1)
markerstrokewidth --> 0
label --> ""
[volumes[index]], [min]
end
return Volumes(volumes), Energies(energies)
end
@recipe function f(eos::PressureEquation, volumes=eos.param.v0 .* (0.5:0.01:1.1))
pressures = map(eos, volumes)
Expand Down

0 comments on commit ee3e177

Please sign in to comment.