1<?xml version="1.0" encoding="UTF-8"?> 2<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension"> 3 <name>Function Plotter</name> 4 <id>org.inkscape.effect.func_plot</id> 5 <param name="tab" type="notebook"> 6 <page name="sampling" gui-text="Range and sampling"> 7 <param name="xstart" type="float" min="-1000.0" max="1000.0" gui-text="Start X value:">0.0</param> 8 <param name="xend" type="float" min="-1000.0" max="1000.0" gui-text="End X value:">1.0</param> 9 <param name="times2pi" type="bool" gui-text="Multiply X range by 2*pi">false</param> 10 <param name="ybottom" type="float" min="-1000.0" max="1000.0" gui-text="Y value of rectangle's bottom:">0.0</param> 11 <param name="ytop" type="float" min="-1000.0" max="1000.0" gui-text="Y value of rectangle's top:">1.0</param> 12 <param name="samples" type="int" min="2" max="1000" gui-text="Number of samples:">8</param> 13 <param name="isoscale" type="bool" gui-text="Isotropic scaling">false</param> 14 <label>When set, Isotropic scaling uses smallest of width/xrange or height/yrange</label> 15 <param name="polar" type="bool" gui-text="Use polar coordinates">true</param> 16 </page> 17 <page name="use" gui-text="Use"> 18 <label xml:space="preserve">Select a rectangle before calling the extension, 19it will determine X and Y scales. If you wish to fill the area, then add x-axis endpoints. 20 21With polar coordinates: 22 Start and end X values define the angle range in radians. 23 X scale is set so that left and right edges of rectangle are at +/-1. 24 Isotropic scaling is disabled. 25 First derivative is always determined numerically.</label> 26 </page> 27 <page name="desc" gui-text="Functions"> 28 <label>Standard Python math functions are available:</label> 29 <label xml:space="preserve" translatable="no"> 30ceil(x); copysign(x, y); fabs(x); floor(x); fmod(x,y); frexp(x); ldexp(x,i); modf(x); remainder(x, y); trunc(x); 31 32exp(x); expm1(x); log(x [, base]); log1p(x); log2(x); log10(x); pow(x,y); sqrt(x); 33 34cos(x); sin(x); tan(x); acos(x); asin(x); atan(x); atan2(y,x); dist(p, q); hypot(x,y); 35 36degrees(x); radians(x); 37 38cosh(x); sinh(x); tanh(x); acosh(x); asinh(x); atanh(x); 39 40erf(x); erfc(x); gamma(x); lgamma(x). 41 </label> 42 <label>The constants pi, e and tau are also available.</label> 43 44 <label>Functions from the random library may also be used, 45 eg. random(); randint(a, b); uniform(a, b).</label> 46 </page> 47 <page name="Help" gui-text="Help"> 48 <label>This extension creates a plot of a function (in variable x).</label> 49 50 <label>In order to use the extension, select a rectangle first. The rectangle will serve as bounding box of the plot.</label> 51 </page> 52 </param> 53 <param name="fofx" type="string" gui-text="Function:">exp(-x*x)</param> 54 <param name="fponum" type="bool" gui-text="Calculate first derivative numerically">true</param> 55 <param name="fpofx" type="string" gui-text="First derivative:">x</param> 56 <param name="clip" type="bool" gui-text="Clip with rectangle">false</param> 57 <param name="remove" type="bool" gui-text="Remove rectangle">true</param> 58 <param name="drawaxis" type="bool" gui-text="Draw Axes">false</param> 59 <param name="endpts" type="bool" gui-text="Add x-axis endpoints">false</param> 60 <effect> 61 <object-type>rect</object-type> 62 <effects-menu> 63 <submenu name="Render"/> 64 </effects-menu> 65 </effect> 66 <script> 67 <command location="inx" interpreter="python">funcplot.py</command> 68 </script> 69</inkscape-extension> 70