minor fixes regarding colorbarplot
This commit is contained in:
parent
d18b113641
commit
b913bf5117
@ -390,9 +390,9 @@ version = "1.14.10+0"
|
|||||||
|
|
||||||
[[deps.DelaunayTriangulation]]
|
[[deps.DelaunayTriangulation]]
|
||||||
deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "Random"]
|
deps = ["AdaptivePredicates", "EnumX", "ExactPredicates", "Random"]
|
||||||
git-tree-sha1 = "e1371a23fd9816080c828d0ce04373857fe73d33"
|
git-tree-sha1 = "5620ff4ee0084a6ab7097a27ba0c19290200b037"
|
||||||
uuid = "927a84f5-c5f4-47a5-9785-b46e178433df"
|
uuid = "927a84f5-c5f4-47a5-9785-b46e178433df"
|
||||||
version = "1.6.3"
|
version = "1.6.4"
|
||||||
|
|
||||||
[[deps.DelimitedFiles]]
|
[[deps.DelimitedFiles]]
|
||||||
deps = ["Mmap"]
|
deps = ["Mmap"]
|
||||||
|
|||||||
12
app.jl
12
app.jl
@ -142,7 +142,7 @@ end
|
|||||||
showgrid=true
|
showgrid=true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
# Dummy 2D surface plot
|
# Dummy 2D scatter plot
|
||||||
traceSpectra=PlotlyBase.scatter(x=[], y=[], mode="lines")
|
traceSpectra=PlotlyBase.scatter(x=[], y=[], mode="lines")
|
||||||
# Create conection to frontend
|
# Create conection to frontend
|
||||||
@out plotdata=[traceSpectra]
|
@out plotdata=[traceSpectra]
|
||||||
@ -234,7 +234,7 @@ end
|
|||||||
spectra=LoadImzml(full_route)
|
spectra=LoadImzml(full_route)
|
||||||
msg="File loaded. Creating Spectra with the specific mass and tolerance, please be patient."
|
msg="File loaded. Creating Spectra with the specific mass and tolerance, please be patient."
|
||||||
slice=GetSlice(spectra, Nmass, Tol)
|
slice=GetSlice(spectra, Nmass, Tol)
|
||||||
fig=CairoMakie.Figure(size=(100, 200)) # Container
|
fig=CairoMakie.Figure(size=(120, 220)) # Container
|
||||||
# Append a query string to force the image to refresh
|
# Append a query string to force the image to refresh
|
||||||
timestamp=string(time_ns())
|
timestamp=string(time_ns())
|
||||||
if triqEnabled # If we have TrIQ
|
if triqEnabled # If we have TrIQ
|
||||||
@ -257,7 +257,7 @@ end
|
|||||||
current_triq="TrIQ_$(text_nmass).bmp"
|
current_triq="TrIQ_$(text_nmass).bmp"
|
||||||
msgtriq="TrIQ image with the Nmass of $(replace(text_nmass, "_" => "."))"
|
msgtriq="TrIQ image with the Nmass of $(replace(text_nmass, "_" => "."))"
|
||||||
# Create colorbar
|
# Create colorbar
|
||||||
ticks=round.(range(0, stop=maximum(TrIQ(slice, Int(triqColor), triqProb)), length=10), digits=2)
|
ticks=round.(range(0, stop=maximum(TrIQ(slice, Int(triqColor), triqProb)), length=10), sigdigits=3)
|
||||||
Colorbar(fig[1, 1], colormap=rgb_ViridisPalette, limits=(0, maximum(TrIQ(slice, Int(triqColor), triqProb))),ticks=ticks, label="Intensity")
|
Colorbar(fig[1, 1], colormap=rgb_ViridisPalette, limits=(0, maximum(TrIQ(slice, Int(triqColor), triqProb))),ticks=ticks, label="Intensity")
|
||||||
save("public/colorbar_TrIQ_$(text_nmass).png", fig)
|
save("public/colorbar_TrIQ_$(text_nmass).png", fig)
|
||||||
colorbarT="/colorbar_TrIQ_$(text_nmass).png?t=$(timestamp)"
|
colorbarT="/colorbar_TrIQ_$(text_nmass).png?t=$(timestamp)"
|
||||||
@ -289,7 +289,7 @@ end
|
|||||||
current_msi="MSI_$(text_nmass).bmp"
|
current_msi="MSI_$(text_nmass).bmp"
|
||||||
msgimg="Image with the Nmass of $(replace(text_nmass, "_" => "."))"
|
msgimg="Image with the Nmass of $(replace(text_nmass, "_" => "."))"
|
||||||
# Create colorbar
|
# Create colorbar
|
||||||
ticks=round.(range(0, stop=maximum(slice), length=10), digits=2)
|
ticks=round.(range(0, stop=maximum(slice), length=10), sigdigits=3)
|
||||||
Colorbar(fig[1, 1], colormap=rgb_ViridisPalette, limits=(0, maximum(slice)),ticks=ticks, label="Intensity")
|
Colorbar(fig[1, 1], colormap=rgb_ViridisPalette, limits=(0, maximum(slice)),ticks=ticks, label="Intensity")
|
||||||
save("public/colorbar_MSI_$(text_nmass).png", fig)
|
save("public/colorbar_MSI_$(text_nmass).png", fig)
|
||||||
colorbar="/colorbar_MSI_$(text_nmass).png?t=$(timestamp)"
|
colorbar="/colorbar_MSI_$(text_nmass).png?t=$(timestamp)"
|
||||||
@ -663,7 +663,6 @@ end
|
|||||||
title="2D Topographic Map",
|
title="2D Topographic Map",
|
||||||
xaxis_title="X",
|
xaxis_title="X",
|
||||||
yaxis_title="Y"
|
yaxis_title="Y"
|
||||||
|
|
||||||
)
|
)
|
||||||
traceContour=PlotlyBase.contour(
|
traceContour=PlotlyBase.contour(
|
||||||
z=elevation_smoothed,
|
z=elevation_smoothed,
|
||||||
@ -730,8 +729,7 @@ end
|
|||||||
layoutContour=PlotlyBase.Layout(
|
layoutContour=PlotlyBase.Layout(
|
||||||
title="2D Topographic Map",
|
title="2D Topographic Map",
|
||||||
xaxis_title="X",
|
xaxis_title="X",
|
||||||
yaxis_title="Y",
|
yaxis_title="Y"
|
||||||
|
|
||||||
)
|
)
|
||||||
traceContour=PlotlyBase.contour(
|
traceContour=PlotlyBase.contour(
|
||||||
z=elevation_smoothed,
|
z=elevation_smoothed,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user