Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/EmbeddPlotlyJSSyncPlotLiterate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ function Base.show(io::IO, ::MIME"text/html", fig::PlotlyJS.SyncPlot)
# Copy is required because we pop layout width/height for Plotly's inner JSON.
# Mutating fig.plot directly would change size(fig) and user-visible behavior.
plot = copy(fig.plot)
plot.frames = fig.plot.frames
plot.config = deepcopy(fig.plot.config)
plot.config.displayModeBar = false
default_width = layout_to_html_default_size!(plot.layout.fields, :width, get(plot.layout.fields, :width, nothing))
default_height = layout_to_html_default_size!(plot.layout.fields, :height, get(plot.layout.fields, :height, nothing))

html_buffer = IOBuffer()
PlotlyJS.PlotlyBase.to_html(
html_buffer,
plot;
autoplay=false,
full_html=true,
include_plotlyjs="cdn",
default_width=default_width,
Expand Down
Binary file removed examples/3.tutorials/adiabatic_pulses/BIR4.mat
Binary file not shown.
53 changes: 0 additions & 53 deletions examples/3.tutorials/adiabatic_pulses/BIR4InversionB0B1.jl

This file was deleted.

37 changes: 0 additions & 37 deletions examples/3.tutorials/adiabatic_pulses/BIR4InversionProfile.jl

This file was deleted.

30 changes: 0 additions & 30 deletions examples/3.tutorials/adiabatic_pulses/HSInversionProfile.jl

This file was deleted.

18 changes: 16 additions & 2 deletions examples/3.tutorials/lit-03-ChemicalShiftEPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,22 @@ sys = Scanner(); #hide
obj = brain_phantom2D() # a slice of a brain
p1 = plot_phantom_map(obj, :T2 ; height=400, width=400, view_2d=true)
p2 = plot_phantom_map(obj, :Δw ; height=400, width=400, view_2d=true)
#md [p1 p2] #hide
#jl display([p1 p2])
p = [p1 p2] #hide
p.plot.layout.fields[:xaxis2][:scaleanchor] = "y2" #hide
p.plot.layout.fields[:xaxis1][:domain] = [0.0, 0.40] #hide
p.plot.layout.fields[:xaxis2][:domain] = [0.58, 0.98] #hide
for axis in (:xaxis1, :yaxis1, :xaxis2, :yaxis2) #hide
p.plot.layout.fields[axis][:title] = "" #hide
p.plot.layout.fields[axis][:ticks] = "" #hide
p.plot.layout.fields[axis][:showticklabels] = false #hide
end #hide
for (trace, x) in zip(p.plot.data, (0.43, 1.02)) #hide
trace.fields[:marker][:colorbar][:x] = x #hide
trace.fields[:marker][:colorbar][:len] = 0.55 #hide
trace.fields[:marker][:colorbar][:thickness] = 14 #hide
end #hide
#md p #hide
#jl display(p)

# At the left, you can see the ``T_2`` map of the phantom,
# and at the right, the off-resonance ``\Delta\omega``.
Expand Down
15 changes: 13 additions & 2 deletions examples/3.tutorials/lit-04-3DSliceSelective.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ p3 = plot_signal(raw; slider=false, height=300)
# Finally, we reconstruct the acquiered images.

## Get the acquisition data
raw.params["trajectory"] = "other"
acq = AcquisitionData(raw)

## Setting up the reconstruction parameters and perform reconstruction
Expand All @@ -58,5 +59,15 @@ image = reconstruction(acq, reconParams)
p4 = plot_image(abs.(image[:, :, 1]); height=360, title="Slice 1")
p5 = plot_image(abs.(image[:, :, 2]); height=360, title="Slice 2")
p6 = plot_image(abs.(image[:, :, 3]); height=360, title="Slice 3")
#md [p4 p5 p6] #hide
#jl display([p4 p5 p6])
p = [p4 p5 p6] #hide
foreach(t -> t.fields[:showscale] = false, p.plot.data) #hide
for (i, xref) in enumerate(("x", "x2", "x3")) #hide
xaxis = Symbol("xaxis", i) #hide
yaxis = Symbol("yaxis", i) #hide
p.plot.layout.fields[yaxis][:scaleanchor] = xref #hide
p.plot.layout.fields[yaxis][:constrain] = "domain" #hide
p.plot.layout.fields[xaxis][:range] = [-0.5, Nx - 0.5] #hide
p.plot.layout.fields[yaxis][:range] = [-0.5, Ny - 0.5] #hide
end #hide
#md p #hide
#jl display(p)
Loading
Loading