-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
I hacked this together manually, but an L-shaped scalebar plottable seems useful
for (int i = abf.sweepCount - 1; i >= 0; i--)
{
double frac = (double)i / (abf.sweepCount - 1);
Color color = Mix("#8181f2", "#a2f0ca", frac);
var trace = abf.GetSweep(i);
plt.PlotSignal(
ys: trace.values,
sampleRate: trace.sampleRate,
color: color,
yOffset: i * 15,
xOffset: i * .025,
maxRenderIndex: 20000, lineWidth: 2);
}
// hack-in an L-shaped scalebar until ScottPlot supports it natively
plt.PlotLine(1.15, -50, 1.25, -50, lineWidth: 2, color: Color.Black);
plt.PlotLine(1.25, -50, 1.25, -10, lineWidth: 2, color: Color.Black);
plt.PlotText("100 ms", 1.2, -50, color: Color.Black, fontSize: 16,
alignment: ScottPlot.TextAlignment.upperCenter);
plt.PlotText("40 mV", 1.25, -58, color: Color.Black, fontSize: 16, rotation: -90);
plt.Grid(false);
plt.Ticks(false, false);
plt.Frame(false);
plt.Resize(800, 600);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
