diff --git a/src/Recipes/SeisOverlayRecipe.jl b/src/Recipes/SeisOverlayRecipe.jl index ad6f5a7..83808a7 100644 --- a/src/Recipes/SeisOverlayRecipe.jl +++ b/src/Recipes/SeisOverlayRecipe.jl @@ -61,13 +61,17 @@ end function Makie.plot!(overlay::SeisOverlay{<:Tuple{AbstractMatrix{<:Real}}}) - seisimage!(overlay, overlay.d[], ox=overlay.ox[], dx=overlay.dx[], oy=overlay.oy[], + # Clipping the negative values of the first wiggle + clipped_d = copy(overlay.d[]) + clipped_d[:, 1] = max.(clipped_d[:, 1], 0) + + seisimage!(overlay, clipped_d, ox=overlay.ox[], dx=overlay.dx[], oy=overlay.oy[], dy=overlay.dy[], cmap=overlay.cmap[], vmin=overlay.vmin[], vmax=overlay.vmax[], pclip=overlay.pclip[]) - seiswiggle!(overlay, overlay.d[], ox=overlay.ox[], dx=overlay.dx[], oy=overlay.oy[], + seiswiggle!(overlay, clipped_d, ox=overlay.ox[], dx=overlay.dx[], oy=overlay.oy[], dy=overlay.dy[], xcur=overlay.xcur[], wiggle_trace_increment=overlay.wiggle_trace_increment[], diff --git a/src/SeisPlotTX.jl b/src/SeisPlotTX.jl index b5caccd..9ae06e1 100644 --- a/src/SeisPlotTX.jl +++ b/src/SeisPlotTX.jl @@ -59,6 +59,9 @@ function SeisPlotTX(d; trace_width=trace_width, cmap=cmap) Colorbar(fig[1, 2], overlay) + + xlims!(ax, low=ox, high=ox+size(d,2)*dx) + elseif style == "wiggles" || style == "wiggle" if !isnothing(gx) ox = gx[1] @@ -70,12 +73,16 @@ function SeisPlotTX(d; wiggle_line_color=wiggle_line_color, wiggle_fill_color=wiggle_fill_color, trace_width=trace_width) + + xlims!(ax, low=ox-dx, high=ox+size(d,2)*dx) + else img = seisimage!(ax, d; ox=ox, dx=dx, oy=oy, dy=dy, pclip=pclip, vmin=vmin, vmax=vmax, cmap=cmap) Colorbar(fig[1,2], img) + + xlims!(ax, low=ox, high=ox+size(d,2)*dx) end - xlims!(ax, low=ox-dx, high=ox+size(d,2)*dx) return fig, ax end