Skip to content

Commit

Permalink
Fix range choice in TempVolPlot & PressTempPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Sep 4, 2023
1 parent 2a590e5 commit 4d7f24c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/recipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using RecipesBase: @recipe, @userplot, @series
rawdata = transpose(rawdata)
end
temperatures, volumes = dims(rawdata)
r = length(plot.args) == 2 ? last(plot.args) : range(1; stop=size(rawdata, 1), length=5)
r = length(plot.args) == 2 ? last(plot.args) : 1:1:5
r = convert(StepRange{Int64,Int64}, r)
free_energies = eachrow(rawdata[r, :]) # At each temperature, the free energy is a function of volume.
size --> (800, 500)
Expand Down Expand Up @@ -53,7 +53,7 @@ end
rawdata = transpose(rawdata)
end
pressures, temperatures = dims(rawdata)
r = length(plot.args) == 2 ? last(plot.args) : range(1; stop=size(rawdata, 1), length=5)
r = length(plot.args) == 2 ? last(plot.args) : 1:1:5
r = convert(StepRange{Int64,Int64}, r) # Select pressures
data = eachrow(rawdata[r, :]) # At each pressure, the data is a function of temperature.
size --> (800, 500)
Expand Down

0 comments on commit 4d7f24c

Please sign in to comment.