SVG-based visualization for quantum states and circuits.
This namespace provides scalable vector graphics (SVG) generation using Hiccup for high-quality quantum visualization that can be embedded in web pages or saved as standalone files.
SVG-based visualization for quantum states and circuits. This namespace provides scalable vector graphics (SVG) generation using Hiccup for high-quality quantum visualization that can be embedded in web pages or saved as standalone files.
(generate-bar-chart-layout data-count
width
height
&
{:keys [force-rotation] :or {force-rotation false}})
Generate layout parameters for bar charts.
Parameters:
Returns: Map with layout parameters including margins, bar dimensions, rotation settings
Generate layout parameters for bar charts. Parameters: - data-count: Number of data points (bars) - width: Chart width - height: Chart height - options: Layout options Returns: Map with layout parameters including margins, bar dimensions, rotation settings
(generate-svg-bars
values
labels
layout
&
{:keys [max-value value-formatter tooltip-formatter unit-suffix]
:or {value-formatter identity tooltip-formatter str unit-suffix ""}})
Generate SVG bar elements for charts.
Parameters:
Returns: Vector of SVG bar group elements
Generate SVG bar elements for charts. Parameters: - values: Vector of bar values (probabilities or counts) - labels: Vector of bar labels - layout: Layout parameters from generate-bar-chart-layout - options: Bar generation options - :max-value - Maximum value for scaling - :value-formatter - Function to format values for display - :tooltip-formatter - Function to format tooltips - :unit-suffix - Unit suffix for values (e.g., '%', 'shots') Returns: Vector of SVG bar group elements
(generate-svg-chart-labels width height title y-label x-label)
Generate SVG chart title and axis labels.
Parameters:
Returns: Vector of SVG text elements [title y-label x-label]
Generate SVG chart title and axis labels. Parameters: - width: Chart width - height: Chart height - title: Chart title - y-label: Y-axis label - x-label: X-axis label Returns: Vector of SVG text elements [title y-label x-label]
(generate-svg-x-axis layout)
Generate SVG X-axis line.
Parameters:
Returns: SVG line element
Generate SVG X-axis line. Parameters: - layout: Layout parameters Returns: SVG line element
(generate-svg-y-axis layout
max-value
unit-label
&
{:keys [tick-formatter] :or {tick-formatter str}})
Generate SVG Y-axis with ticks and labels.
Parameters:
Returns: SVG Y-axis group element
Generate SVG Y-axis with ticks and labels. Parameters: - layout: Layout parameters - max-value: Maximum value for scaling - unit-label: Unit label for axis (e.g., 'Probability (%)', 'Count') - tick-formatter: Function to format tick labels Returns: SVG Y-axis group element
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close