Skip to content

PlotShape without a display starts with v, as with one - #3954

Merged
ramcdougal merged 1 commit into
neuronsimulator:masterfrom
ec1dev:plotshape-data-default-v
Nov 15, 2026
Merged

ramcdougal merged 1 commit into
neuronsimulator:masterfrom
ec1dev:plotshape-data-default-v

Conversation

@ec1dev

@ec1dev ec1dev commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #3951.

A PlotShape without a display (ShapePlotData) had no variable until variable() was called, while one with a display (ShapePlot) starts with v, which is also what the PlotShape docs say. So nrn_get_plotshape_varname gave "", and ps.plot(pyplot) or ps.plot(plotly) without a display didn't color the shape by v. ShapePlotData now starts with v, looked up the same way as in ShapePlotImpl (hoc_table_lookup("v", hoc_built_in_symlist)).

So a no-display ps.plot(...) without variable() is now colored by v, as with a display. For a default PlotShape(False), get_plotshape_data gives ('', None, -80.0, 40.0) on 9.1.0.dev46 and ('v', None, -80.0, 40.0) with this, the same as after ps.variable("v").

test/api/plotshape_interface.cpp now checks the default name too. It fails without the change ("FAIL: default varname") and passes with it.

A ShapePlot (with a display) starts with v. A ShapePlotData (no display)
had no variable until variable() was called, so
nrn_get_plotshape_varname returned "" and ps.plot(pyplot) or
ps.plot(plotly) did not color the shape by v. The PlotShape docs say the
default variable is v.

Fixes neuronsimulator#3951.
@sonarqubecloud

Copy link
Copy Markdown

@ramcdougal
ramcdougal enabled auto-merge (squash) November 15, 2026 03:03
@codecov

codecov Bot commented Nov 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.68%. Comparing base (783998a) to head (a29c498).

Files with missing lines Patch % Lines
src/nrniv/shapeplt.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3954   +/-   ##
=======================================
  Coverage   68.68%   68.68%           
=======================================
  Files         716      716           
  Lines      115559   115560    +1     
=======================================
+ Hits        79369    79372    +3     
+ Misses      36190    36188    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ramcdougal
ramcdougal merged commit dfd44ce into neuronsimulator:master Nov 15, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShapePlot inconsistency

2 participants