Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
remove ternary expression and unecessary(?) scatter args
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredclwong committed May 4, 2021
1 parent 85d4fb8 commit 88adb96
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/GlassCat/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function drawglassmap(glasscatalog::Module; λ::Length = 550nm, glassfontsize::I

# don't show glasses that have an _ in the name. This prevents cluttering the map with many glasses of
# similar (index, dispersion).
if (mindispersion <= dispersion <= maxdispersion) && (showprefixglasses ? true : !hasprefix)
if (mindispersion <= dispersion <= maxdispersion) && (showprefixglasses || !hasprefix)
push!(indices, index(glass, wavelength))
push!(dispersions, dispersion)
push!(glassnames, String(name))
Expand All @@ -361,5 +361,13 @@ function drawglassmap(glasscatalog::Module; λ::Length = 550nm, glassfontsize::I

font = Plots.font(family = "Sans", pointsize = glassfontsize, color = RGB(0.0,0.0,.4))
series_annotations = Plots.series_annotations(glassnames, font)
scatter(dispersions, indices, xaxis = "dispersion", yaxis = "index", series_annotations = series_annotations, markersize = .001, legends = :none, markeralpha = 0.0, markershape = :none, title = "Glass Catalog: $glasscatalog")
scatter(
dispersions,
indices;
series_annotations,
markeralpha = 0.0,
legends = :none,
xaxis = "dispersion",
yaxis = "index",
title = "Glass Catalog: $glasscatalog")
end

0 comments on commit 88adb96

Please sign in to comment.