LayMeshDocs
中文

Scientific

scientific.lay
page = canvas(size=(180 mm, 82 mm), background="#ffffff")d = table(src="results.csv")style = plot_style(font_family="DejaVu Sans", font_size=8 pt, line_width=0.6 pt)p = plot(size=(80 mm, 65 mm), x=axis(label="Time (s)"), y=axis(label="Intensity"), style=style)p.band(x=d["time"], lower=d["lower"], upper=d["upper"], color="#0072B2")p.line(x=d["time"], y=d["signal"], color="#0072B2", label="Experiment")p.scatter(x=d["time"], y=d["signal"], color="#0072B2", marker_size=3 pt)p.errorbar(x=d["time"], y=d["signal"], yerr=d["error"], color="#0072B2")p.hline(y=2, color="#777777", line_dash=[2 pt, 2 pt], label="Reference")p.legend(position= top_left)left = page.add(p, target=page.top_left, offset=(7 mm, 6 mm))h = plot(size=(80 mm, 65 mm), x=axis(label="x"), y=axis(label="y"), style=style)heat = h.heatmap(z=[[1,2,3,4],[2,4,6,5],[3,6,9,6],[4,5,6,4]], extent=(0,4,0,4), origin= lower, cmap="viridis")h.colorbar(heat, label="Value")

Preview

Background
Scientific
Original example
Total —
Details

Not run yet

Measured in this browser; excludes debounce.

Edits stay on this page
Dependencies
  • examples/plot/results.csv
  • examples/plot/scientific.lay

Reproduce

sh
laymesh validate examples/plot/scientific.laylaymesh render examples/plot/scientific.lay -o figure.svglaymesh render examples/plot/scientific.lay -o figure.pdflaymesh render examples/plot/scientific.lay -o figure.png --dpi 300