-
- Downloads
don't abort when no points to plot
this will allow to have "phantom" legend for more complex graphs ```nushell let xs = seq 0 0.1 20 let graphs = [ { points: ($xs | each {|x| { x: $x, y: (1.1 * $x ** 2), e: (0.1 + 0.5 * $x), }}), style: { color: "tab:blue", line: { type: "solid", marker: { size: 0, }, }, }, }, { points: ($xs | each {|x| { x: $x, y: (1.5 * $x ** 2), e: (0.1 + 0.5 * $x), }}), style: { color: "tab:orange", line: { type: "solid", marker: { size: 0, }, }, }, }, { points: ($xs | each {|x| { x: $x, y: (10 + 100 * 1.1 * ($x | math sqrt)), e: (0.1 + 0.5 * ($x | math sqrt)), }}), style: { color: "tab:blue", line: { type: "dashed", marker: { size: 0, }, }, }, }, { points: ($xs | each {|x| { x: $x, y: (10 + 100 * 1.5 * ($x | math sqrt)), e: (0.1 + 0.5 * ($x | math sqrt)), }}), style: { color: "tab:orange", line: { type: "dashed", marker: { size: 0, }, }, }, }, { name: "$\\alpha = 1.5$", points: [], style: { color: "tab:orange", line: { type: "solid", marker: { size: 0, }, }, }, } { name: "$\\alpha = 1.1$", points: [], style: { color: "tab:blue", line: { type: "solid", marker: { size: 0, }, }, }, } { name: "$f: x \\rightarrow \\alpha x^2$", points: [], style: { color: "tab:grey", line: { type: "solid", marker: { size: 0, }, }, }, } { name: "$f: x \\rightarrow 10 + 100 \\alpha \\sqrt{x}$", points: [], style: { color: "tab:grey", line: { type: "dashed", marker: { size: 0, }, }, }, } ] python src/main.py plot ($graphs | to json) ...[ --x-label "$x$" --y-label "$f(x)$" --fullscreen --dpi 50 --use-tex ] ```
Please register or sign in to comment