summaryrefslogtreecommitdiffstats
path: root/share/extensions/funcplot.inx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /share/extensions/funcplot.inx
parentInitial commit. (diff)
downloadinkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz
inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/extensions/funcplot.inx')
-rw-r--r--share/extensions/funcplot.inx69
1 files changed, 69 insertions, 0 deletions
diff --git a/share/extensions/funcplot.inx b/share/extensions/funcplot.inx
new file mode 100644
index 0000000..d752fa9
--- /dev/null
+++ b/share/extensions/funcplot.inx
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
+ <name>Function Plotter</name>
+ <id>org.inkscape.effect.func_plot</id>
+ <param name="tab" type="notebook">
+ <page name="sampling" gui-text="Range and sampling">
+ <param name="xstart" type="float" min="-1000.0" max="1000.0" gui-text="Start X value:">0.0</param>
+ <param name="xend" type="float" min="-1000.0" max="1000.0" gui-text="End X value:">1.0</param>
+ <param name="times2pi" type="bool" gui-text="Multiply X range by 2*pi">false</param>
+ <param name="ybottom" type="float" min="-1000.0" max="1000.0" gui-text="Y value of rectangle's bottom:">0.0</param>
+ <param name="ytop" type="float" min="-1000.0" max="1000.0" gui-text="Y value of rectangle's top:">1.0</param>
+ <param name="samples" type="int" min="2" max="1000" gui-text="Number of samples:">8</param>
+ <param name="isoscale" type="bool" gui-text="Isotropic scaling">true</param>
+ <label>When set, Isotropic scaling uses smallest of width/xrange or height/yrange</label>
+ <param name="polar" type="bool" gui-text="Use polar coordinates">true</param>
+ </page>
+ <page name="use" gui-text="Use">
+ <label xml:space="preserve">Select a rectangle before calling the extension,
+it will determine X and Y scales. If you wish to fill the area, then add x-axis endpoints.
+
+With polar coordinates:
+ Start and end X values define the angle range in radians.
+ X scale is set so that left and right edges of rectangle are at +/-1.
+ Isotropic scaling is disabled.
+ First derivative is always determined numerically.</label>
+ </page>
+ <page name="desc" gui-text="Functions">
+ <label>Standard Python math functions are available:</label>
+ <label xml:space="preserve" translatable="no">
+ceil(x); copysign(x, y); fabs(x); floor(x); fmod(x,y); frexp(x); ldexp(x,i); modf(x); remainder(x, y); trunc(x);
+
+exp(x); expm1(x); log(x [, base]); log1p(x); log2(x); log10(x); pow(x,y); sqrt(x);
+
+cos(x); sin(x); tan(x); acos(x); asin(x); atan(x); atan2(y,x); dist(p, q); hypot(x,y);
+
+degrees(x); radians(x);
+
+cosh(x); sinh(x); tanh(x); acosh(x); asinh(x); atanh(x);
+
+erf(x); erfc(x); gamma(x); lgamma(x).
+ </label>
+ <label>The constants pi, e and tau are also available.</label>
+
+ <label>Functions from the random library may also be used,
+ eg. random(); randint(a, b); uniform(a, b).</label>
+ </page>
+ <page name="Help" gui-text="Help">
+ <label>This extension creates a plot of a function (in variable x).</label>
+
+ <label>In order to use the extension, select a rectangle first. The rectangle will serve as bounding box of the plot.</label>
+ </page>
+ </param>
+ <param name="fofx" type="string" gui-text="Function:">sin(x)</param>
+ <param name="fponum" type="bool" gui-text="Calculate first derivative numerically">true</param>
+ <param name="fpofx" type="string" gui-text="First derivative:">cos(x)</param>
+ <param name="clip" type="bool" gui-text="Clip with rectangle">false</param>
+ <param name="remove" type="bool" gui-text="Remove rectangle">true</param>
+ <param name="drawaxis" type="bool" gui-text="Draw Axes">false</param>
+ <param name="endpts" type="bool" gui-text="Add x-axis endpoints">false</param>
+ <effect>
+ <object-type>rect</object-type>
+ <effects-menu>
+ <submenu name="Render"/>
+ </effects-menu>
+ </effect>
+ <script>
+ <command location="inx" interpreter="python">funcplot.py</command>
+ </script>
+</inkscape-extension>