Meta tags:
description= Description When Plotly.react is called to update a plot that has a contour trace with autocontour true, the contour size/min/max are all calculated based on the previous contour trace z values. This can result in no contours being drawn...;
Headings (most frequently used words):
commented, on, oct, 2026, navigation, 15, description, metadata, footer, 14, capy, zhiao, bug, contour, trace, updated, with, plotly, react, uses, stale, zmin, zmax, 8117, menu, repository, activity, issue, actions, steps, to, reproduce, koolade85, camdecoster, greg9504, assignees, labels, type, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (47), trace (30), and (27), for (23), zmin (19), 2026 (17), #plotly (17), contour (17), zmax (16), oct (16), undefined (16), react (15), calc (15), github (14), with (13), this (12), issue (12), that (10), none (10), bug (10), zauto (10), actions (9), coloring (9), you (8), not (8), capy (8), zhiao (8), colorscale (8), fix (7), are (7), vals (7), suitable (6), newcomers (6), something (6), broken (6), backlog (6), stale (6), layout (6), new (6), contours (6), greg9504 (6), more (6), min (6), _zmax (6), _zmin (6), security (5), copilot (5), size (5), sign (5), already (5), when (5), datarevision (5), call (5), stackblitz (5), does (5), commented (5), cletter (5), max (5), traces (5), your (5), koolade85 (5), code (5), open (4), first (4), have (4), added (4), once (4), 8117 (4), data (4), only (4), false (4), cvals (4), copts (4), src (4), uses (4), setcontours (4), isauto (4), camdecoster (4), fulldata (4), length (4), all (4), support (4), can (3), navigation (3), projects (3), type (3), good (3), into (3), thanks (3), test (3), from (3), one (3), fixed (3), plot (3), start (3), contributor (3), supplydefaults (3), full (3), lib (3), aggnums (3), math (3), null (3), auto (3), set_contours (3), why (3), values (3), copies (3), happens (3), investigate (3), newfulldata (3), copy (3), link (3), updated (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), reload (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), time (2), community (2), status (2), footer (2), app (2), pull (2), requests (2), development (2), milestone (2), labels (2), assignees (2), metadata (2), free (2), commit (2), ff311c5 (2), will (2), autocontour (2), reacted (2), cause (2), copied (2), arrays (2), was (2), though (2), note (2), detect (2), array (2), there (2), nothing (2), recalculated (2), shows (2), demo (2), bumped (2), removed (2), edittype (2), end (2), both (2), case (2), regression (2), alternative (2), but (2), present (2), skip (2), contourcarpet (2), how (2), crosstracedefaults (2), setting (2), coerced (2), works (2), skips (2), _fulldata (2), then (2), set (2), cbopt (2), cont (2), replace (2), relinkprivatekeys (2), after (2), which (2), colorscaledefaults (2), style_defaults (2), reproduce (2), has (2), settings (2), const (2), correct (2), before (2), called (2), previous (2), oldfulldata (2), plots (2), description (2), 8122 (2), insights (2), 727 (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), fixes (2), products (2), secret (2), perform, action, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, branches, yet, relationships, comment, account, join, conversation, references, close, merged, main, branch, don, reuse, cameron, decoster, ikari_, finding, came, larger, application, where, debugger, real, incremented, each, had, effect, author, verified, script, running, every, mode, plus, range, leave, other, modes, unchanged, option, unless, prefer, contour_test, avoids, cache, entirely, would, longer, suggested, treat, consistent, read, also, input, help, clearing, shares, path, affected, too, its, colorscalecalc, histogram2dcontour, since, var, components, cross_trace_defaults, them, because, zout, still, calls, writes, onto, prefix, coerce, traceout, tracein, never, stays, investigated, same, heatmap, lines, fill, assigned, feel, findings, done, assign, please, let, know, anyone, working, suggestions, approach, reproducing, adding, updates, via, preserves, existing, manual, like, contribute, tests, greg, carter, report, context, look, activity, found, reproduced, https, com, edit, iffuoj, file, index, html, steps, any, plotdiv, solve, problem, right, now, workaround, until, made, filled, used, calculate, method, update, true, calculated, based, result, being, drawn, incorrect, ones, even, different, instances, body, opened, items, issues, message, dismiss, alert, switched, accounts, out, appearance, search, pricing, event, talks, workshops, what, next, partners, about, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, add, ons, trust, evaluate, see, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, review, collaboration, platform, menu, content,
Text of the page (random words):
bug contour trace updated with plotly react uses stale zmin zmax issue 8117 plotly plotly js github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message plotly plotly js repository navigation code issues 727 727 pull requests 82 82 actions security and quality insights more items bug contour trace updated with plotly react uses stale zmin zmax 8117 new issue copy link new issue copy link open bug 8122 open bug contour trace updated with plotly react uses stale zmin zmax 8117 bug 8122 copy link assignees labels p3 backlog backlog bug something broken something broken good first issue suitable for newcomers suitable for newcomers size 1 description greg9504 opened on oct 13 2026 issue body actions description when plotly react is called to update a plot that has a contour trace with autocontour true the contour size min max are all calculated based on the previous contour trace z values this can result in no contours being drawn or incorrect ones this happens even though the data arrays are different instances how it happens in plots plots js method supplydefaults if oldfulldata length newfulldata length for i 0 i newfulldata length i relinkprivatekeys newfulldata i oldfulldata i copies the _zmin _zmax from the previous trace to the new trace data in traces contour set_contours js the trace zmin zmax are used to calculate the contour size min max it is not until after setcontours is called in traces contour calc js that a call is made to colorscale calc gd trace vals cvals cletter z that the correct trace zmin zmax are filled in setting the trace zmin zmax to the correct values before the call to plotly react does not solve the problem right now the workaround is to set _zmin _zmax to undefined before the call to react const fulldata this plotdiv as any _fulldata if fulldata fulldata length 0 for const trace of fulldata if trace type contour trace zmin undefined trace zmax undefined trace _zmin undefined trace _zmax undefined steps to reproduce stackblitz https stackblitz com edit js iffuoj file index html found in 2 35 1 but reproduced in 4 1 1 activity greg9504 added bug something broken something broken on oct 13 2026 koolade85 added the bug issue type on oct 14 2026 koolade85 added good first issue suitable for newcomers suitable for newcomers p3 backlog backlog size 1 on oct 14 2026 koolade85 commented on oct 14 2026 koolade85 on oct 14 2026 contributor more actions thanks for the report and the context we ll look into it as we have time react with 1 reacted by greg carter capy zhiao commented on oct 14 2026 capy zhiao on oct 14 2026 more actions hi koolade85 i d like to investigate this and contribute a fix with regression tests i ll start by reproducing the issue and adding a test for contour updates via plotly react then investigate a fix that preserves existing manual settings please let me know if anyone is already working on this or if you have suggestions on the approach thanks camdecoster commented on oct 15 2026 camdecoster on oct 15 2026 contributor more actions capy zhiao feel free to investigate and present your findings when you re done i ll assign you camdecoster assigned capy zhiao on oct 15 2026 capy zhiao commented on oct 15 2026 capy zhiao on oct 15 2026 more actions hi camdecoster i have investigated this and can reproduce it it only happens when the contour trace has contours coloring none which is the case in the stackblitz with fill lines or heatmap the same plotly react call works cause for coloring none style_defaults js skips colorscaledefaults so zauto zmin zmax are never coerced and zauto stays undefined src traces contour style_defaults js if coloring none colorscaledefaults tracein traceout layout coerce prefix cletter z contour calc js still calls colorscale calc after setcontours which writes zmin _zmin zmax _zmax onto the full trace src traces contour calc js setcontours trace zout colorscale calc gd trace vals cvals cletter z on plotly react relinkprivatekeys copies _zmin _zmax to the new full trace and crosstracedefaults copies them into zmin zmax because isauto is undefined src components colorscale cross_trace_defaults js var isauto copts auto if isauto copts min undefined replace cont cbopt min if isauto copts max undefined replace cont cbopt max setcontours then uses the stale values since zauto is undefined and zmin is set src traces contour set_contours js if trace zauto zmin undefined zmin lib aggnums math min null vals this is also why setting zmin zmax on the input does not help not coerced for coloring none and why clearing _zmin _zmax on _fulldata works histogram2dcontour shares this path and is affected too contourcarpet is not as its calc already skips colorscalecalc for coloring none greg9504 one note on the stackblitz layout datarevision is fixed at 6 so plotly react does not detect the new z array there and nothing is recalculated contours start end are edittype plot a fix only shows up in that demo once datarevision is bumped or removed suggested fix in set_contours js treat an undefined zauto as auto consistent with how colorscale calc copts auto false and crosstracedefaults already read it if trace zauto zmin undefined if trace zauto false zmin undefined zmin lib aggnums math min null vals if trace zauto zmax undefined if trace zauto false zmax undefined zmax lib aggnums math max null vals an alternative is to skip colorscale calc in contour calc js when contours coloring none as contourcarpet calc js already does colorscale calc gd trace vals cvals cletter z if contours coloring none colorscale calc gd trace vals cvals cletter z that avoids the stale cache entirely but zmin zmax would no longer be present on the full trace for coloring none i verified both with a script running supplydefaults calc supplydefaults calc for every coloring mode plus the zauto false fixed range case both fix none and leave the other modes unchanged i will open a pr with the first option and a plotly react regression test in contour_test js unless you prefer the alternative greg9504 commented on oct 15 2026 greg9504 on oct 15 2026 contributor author more actions 8 greg9504 one note on the stackblitz layout datarevision is fixed at 6 so plotly react does not detect the new z array there and nothing is recalculated contours start end are edittype plot a fix only shows up in that demo once datarevision is bumped or removed the test data came from a larger application where i copied the data and layout arrays from the debugger i only copied the layout once in the real app layout datarevision was incremented on each call to plotly react and it had no effect that was in 2 31 1 though thanks for finding the cause react with 2 reacted by cameron decoster and ikari_ capy zhiao added a commit that references this issue on oct 15 2026 fix plotly 8117 don t reuse stale zmin zmax for autocontour when co this issue will close once commit ff311c5 is merged into the main branch ff311c5 sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees capy zhiao labels p3 backlog backlog bug something broken something broken good first issue suitable for newcomers suitable for newcomers size 1 type bug projects no projects milestone no milestone relationships none yet development no branches or pull requests issue actions open in github copilot app footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|