Skip to content

Contours width has no effect #502

Closed
Closed

Description

@mmikhasenko

No sure where the report belongs, so duplicating discussion in JuliaPlots/Plots.jl#3127 here

width should be valid property of contours.

It does not seem to have any effect,

MWE
using PlotlyJS
using WebIO

begin
	# Define grid
	x = range(-1, 1, length=100)
	y = range(-1, 1, length=100)
	z = [abs2(xi + 1im * yi) for yi in y, xi in x]  # note: Plotly expects z as rows = y, cols = x
end

# Create surface trace
trace = surface(
    x = x,
    y = y,
    z = z,
    showscale = false,
	contours = attr(
        z = attr(
            show = true,
            color = "white",
            width = 16,
        )
    )
)

savefig(
	plot(trace, Layout(scene = attr(xaxis = attr(visible=false),
                                yaxis = attr(visible=false),
                                zaxis = attr(visible=false)))),
		"test.png")

Versions:

Please provide the following:

  1. output of julia command versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 8 × Apple M3
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
Threads: 4 default, 0 interactive, 2 GC (on 4 virtual cores)
Environment:
  JULIA_REVISE_WORKER_ONLY = 1
  1. using Pkg; Pkg.status(): PlotlyJS v0.18.16

Activity

  1. jd-foster commented on Apr 22, 2026

    @jd-foster
    Collaborator

    I had a chance to look into this. It appears to be a known bug in plotly: plotly/plotly.js#3668
    and following that thread, it appears to come down to (certain/all?) browsers not supporting line width rendering as a limitation of WebGL:
    https://stackoverflow.com/questions/47444239/how-to-use-gl-linewidth

  2. jd-foster commented on Apr 26, 2026

    @jd-foster
    Collaborator

    Closing due to an upstream issue - please comment if an update comes along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions