Skip to content

Commit

Permalink
Added new colormap and updated print function.
Browse files Browse the repository at this point in the history
- Added Black Body colormap to the miscellaneous_colormaps module.
- Updated print function in colormap_class to avoid temporary arrays.
  • Loading branch information
gha3mi committed Jan 6, 2024
1 parent 0a138fe commit ec0056d
Show file tree
Hide file tree
Showing 2 changed files with 267 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/colormap_class.f90
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
! SOFTWARE.
!-------------------------------------------------------------------------------
! Contributed by vmagnin: 2023-09-26
! Last modification: gha3mi 2023-11-07
! Last modification: gha3mi 2024-01-06
!-------------------------------------------------------------------------------


Expand Down Expand Up @@ -580,6 +580,9 @@ pure subroutine set(self, name, zmin, zmax, levels, varargs, reverse)
call self%create(self%name, self%zmin, self%zmax, plasma)
case("viridis")
call self%create(self%name, self%zmin, self%zmax, viridis)
!
case("black_body")
call self%create(self%name, self%zmin, self%zmax, black_body)
case default
error stop "Unknown colormap!"
end select
Expand Down Expand Up @@ -754,7 +757,7 @@ impure subroutine print(self)
print '(a,g0)', "zmax: ", self%zmax
print '(a,g0)', "Number of levels: ", self%levels
do i = 0, self%levels-1
print '(I3,2x,I3,2x,I3)', self%map(i, 1:3)
print '(I3,2x,I3,2x,I3)', self%map(i, 1), self%map(i, 2), self%map(i, 3)
end do
end subroutine

Expand Down
Loading

0 comments on commit ec0056d

Please sign in to comment.