-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
Fixes #163
got basic scatter plot done but there are weird values in the NIKON glass catalog that are messing things up.
…glasses that have nearly identical [index,dispersion] points so the names don't overlap. Still need to figure out how to get markers not to draw in scatter plot. Setting markershape = :none doesn't work.
This comment has been minimized.
This comment has been minimized.
Maybe marker=:none or marker=nothing? I remember plots args being a real pain and often just not working at all... |
Fixes #163
got basic scatter plot done but there are weird values in the NIKON glass catalog that are messing things up.
Could be improved to show popup menu of glasses that have nearly identical [index,dispersion] points so the names don't overlap. Still need to figure out how to get markers not to draw in scatter plot. Setting markershape = :none doesn't work.
30e50ae
to
a8db36c
Compare
I tried marker = :none and that didn't do anything. The markers still showed up so instead I scaled them to size 0. Which only made them small, not invisible.
|
Fixes #163
merging with new changes on main branch
…s an old name for the function.
Fixes #163
added title to glass catalog map
@friggog or @alfredclwong could you review and approve if there are no remaining issues? Are there any remaining questions? In the future we can change the behavior with respect to glasses that have _ in the name. Are there any blocking issues? set the alpha of the markers to zero so now they don't draw. It's a hack but seems to work. |
Fixes #163
set markeraplha = 0 so the marker shapes don't show up in the glassmap plot.
21b0b30
to
88adb96
Compare
src/GlassCat/utilities.jl
Outdated
g = x -> ForwardDiff.derivative(f, x); | ||
dispersion = g(wavelength) | ||
|
||
if (mindispersion <= dispersion <= maxdispersion) && (showprefixglasses ? true : !hasprefix) #don't show glasses that have an _ in the name. This prevents cluttering the map with many glasses of similar (index,dispersion). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a strong preference for the regular boolean expression (showprefixglasses || !hasprefix)
as opposed to the ternary expression (showprefixglasses ? true : !hasprefix)
. Was there a reason for adding this back in?
src/GlassCat/utilities.jl
Outdated
end | ||
end | ||
series_annotations = Plots.series_annotations(glassnames, Plots.font(family = "Sans", pointsize = glassfontsize, color = RGB(0.0,0.0,.4))) | ||
scatter(dispersions,indices, xaxis = "dispersion", yaxis = "index", series_annotations = series_annotations, markersize = .001, legends = :none, markeralpha = 0.0, markershape = :none, title = "Glass Catalog: $glasscatalog") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are markersize
and markershape
still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
88adb96
to
0a80b79
Compare
8931e82
to
2d3dec9
Compare
@BrianGun I posted a few questions above. I think it's safe to remove |
Fixes #163
added comment explaining markeraplha = 0 argument to scatter.
@alfredclwong everything looks fine. However I cannot verify that the examples are rendering correctly since there is some obscure problem on my local machine that prevents any of the example images from being rendered. Could you verify the glassmap example shows up properly in the Examples docs and then approve? |
I don't see any changes to the Examples docs on this branch. Are the changes pushed? If you're having problems with the docs locally, you should still be able to see them here https://microsoft.github.io/OpticSim.jl/previews/PR164/examples/. |
@alfredclwong The changes aren't in the Examples docs. They are in the GlassCat function docs. The new function shows up there in the preview docs. Everything seems to be working. Could you approve? |
Ah I thought you meant that you'd put in an example of the plot somewhere. Looks good. |
Pull Request Template
Description
Added a function to draw glass maps of glass catalogs
Fixes #163
Type of change
How Has This Been Tested?
Visual verification of plot
Checklist: