Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
Graphs
((('''Index''' * [#AddGraph|How to add an empty graph] * [#PlotEquations|Plot equations] * [#PlotMatrices|Plot matrices] * [#MultiplePlots|Multiple plots] * [#SpecialPlots|Special plots (words, points, colors...)] * [#AnimatedPlots|Animated plots] * [#PlotDomains|Plot domains] * [#PlotByIndex|Plot vectors by index] * [#PlotHandling|Plot handling] * [#KnownIssues|Known issues] * [#History|History] * [#SeeAlso|See also] * [#References|References]))) {BR}[anchor|#AddGraph] ==How to add an empty graph== You can add a 2D/3D Graph from the '''Insert''' item in the menu bar: {{{{Insert > Plot > 2D / 3D [image|add new graph|{UP}graphs/wiki-01-01.png]}}}} {{{{Keyboard shortcut: a 2D Graph can be added directly typing @}}}} Now an empty graph will be added: {{{{[image|empty graphs|{UP}graphs/wiki-01-02.png]}}}} {BR}[anchor|#PlotEquations] ==Plot equations== Variables to plot equations must be: * '''x''' for 2D graphs * '''x''' and/or '''y''' for 3D graphs * '''t''' to [Animations|animate 2D and 3D graphs] {{{{NOTE: variables are case sensitive (x is different from X)}}}} You have multiple ways to plot equations: {{{{Directly from the plot window [image|single equation - direct input|{UP}graphs/wiki-02-01.png]}}}} {{{{Indirectly, building your equation outside the plot window [image|single equation - indirect input|{UP}graphs/wiki-02-02.png]}}}} {BR}[anchor|#PlotMatrices] ==Plot matrices== You can plot figures from [Matrices|matrices] (directly or indirectly): * 2 columns matrices for 2D plots * 3 columns matrices for 3D plots {{{{[image|single equation - matrices|{UP}graphs/wiki-03-01.png]}}}} {BR}[anchor|#MultiplePlots] ==Multiple plots== You can plot multiple equations/matrices on the same graph using the [Multiple values|Multiple values item] on the Functions [Toolbox|toolbox]: {{{{[image|multiple equations/matrices - example|{UP}graphs/wiki-04-01.png]}}}} Each "value" will be colored differently (cycling between 6 colours, in the following order: blue, red, green, magenta, orange and brown) {{{{[image|multiple equations/matrices - colours|{UP}graphs/wiki-04-02.png]}}}} {BR}[anchor|#SpecialPlots] ==Special plots (words, points, colors...)== You can plot words or characters (strings) on your 2D graphs; {{{{[image|special plots|{UP}graphs/wiki-05-01.png]}}}} * Special characters (case sensitive) have position fixed on center on the given coordinates: '''+ . * o x'''; * Words, phrases or non-special characters have top-left corner of (virtual) textbox fixed on the given coordinates; * Size and color columns are not required (so you can use a 3, 4 or 5 columns matrix); * Values of size column are absolute, so the resize action does not affect the appearance of special plots; * Many colors are allowed, using web format (like "#6699CC" or "#FF6699CC") or by name; here is a complete list of possible colors: {{{{<!--PLEASE GROUP COLORS BY NAME--> aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, blanchedalmond, black, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen }}}} {{{{[image|colors|{UP}graphs/wiki-05-02.png]}}}} {{{{NOTE: You can use darkblue, DarkBlue, Dark Blue (recommended), DARKBLUE, D a R k B l U e ant etc... :::: all spaces will be removed and color name will be converted to lower case chars.}}}} {{{{[image|colors|{UP}graphs/wiki-05-03.png] [image|colors|{UP}graphs/wiki-05-04.png] [image|colors|{UP}graphs/wiki-05-05.png]}}}} {{{{NOTE: web colors are allowed both in hexadecimal RGB ("#RRGGBB") or hexadecimal aRGB ("#aaRRGGBB") format.}}}} {{{{NOTE: You can use number instead of color name or web-color. Number composing rule is a bit complex, but it is similar with web-colors: color represented as a hexadecimal number where - first pair is opacity; - second pair is a Red Component; - third pair is a Green Component; - fourth pair is a Blue Component; For example FF00FF00 is a full-opacity Green color (FF 00 FF 00). When you have a hexadecimal number you need to convert it to decimal number to use it in SMath Studio. There are snippets to make easy this conversion ([#color snippets|see References]). Note that because of the maximum 32-bit integer is 2147483647 (0xFFFFFFFF/2) and FF00FF00 = 4278255360 (i.e. greater then the max. integer), then Green is FF00FF00-0xFFFFFFFF-1=-16711936. }}}} {BR}[anchor|#AnimatedPlots] ==Animated plots== See [Animations|animations] {{{{[image|animated plot|{UP}graphs/wiki-06-01.gif]}}}} {BR}[anchor|#PlotDomains] ==Plot domains== If you want to define a plot inside a specified domain you can follow two ways: {{{{Using an if/else statement [image|single equation - direct input|{UP}graphs/wiki-08-01.png]}}}} {{{{NOTE: Any text (empty or not) or message from the [error|error] function will be ignored.}}}} {{{{Using booleans as function parameters [image|single equation - indirect input|{UP}graphs/wiki-08-02.png]}}}} {{{{NOTE: infinite values will be ignored.}}}} {BR}[anchor|#PlotByIndex] ==Plot vectors by index== It is possible to plot a single column vector using as index the x variable. In the plot any x value will be rounded and, if possible, the corresponding vector element will be used as y value: {{{{[image|plot by index|{UP}graphs/wiki-09-01.png]}}}} {BR}[anchor|#Units] ==Units== It is possible to use [Units|units of measurement] inside plots. Because the output units of calculations are base units (f.e. meters for any length unit), you have to scale the input or adjust the viewport. {{{{[image|plot using units|{UP}graphs/wiki-10-01.png]}}}} {BR}[anchor|#PlotHandling] ==Plot handling== A dedicated plot palette allow some operations on the graph. {{{{[image|plot handling - palette|{UP}graphs/wiki-07-01.png] # '''Rotate''': rotate 3D graphs (see [#KnownIssues|Known issues]). # '''Scale''': if you roll your mouse wheel it zooms both axes together. If you hold 'control' keyboard key (CTRL) at the same time it just zooms the vertical axis;{BR}if you use the mouse wheel holding the 'shift' keyboard key (↑) it zooms the horizontal axis. This does not affect the appearance of special plots. # '''Move''': drag the graph up or down, left or right; by default you can move the graph also by clicking and holding the left mouse button on the graph. # '''Graph by points''': show functions/straight lines as a set of points; could be useful to highlight discontinuities. # '''Graph by lines''': show functions/straight lines as lines (default). # '''Refresh''': restore the default view of the graph (axes origin moved to the graph center and zoom with default limits).}}}} Clicking with the right mouse button on the graph appears a context menu that contains other options. {{{{[image|plot handling - context menu|{UP}graphs/wiki-07-02.png]}}}} {BR}[anchor|#KnownIssues] ==Known issues== {| cellspacing="0" cellpadding="8" border="0" style="text-align: center; width: 100%; background-color: #ecffec;" |- | style="color: green; font-weight: bold; font-style: italic; font-size: 11px;" | to inform the developers about issues you found out use the [https://smath.com/bts/|Issues Tracker] or the forum: [https://en.smath.com/forum/yaf_topics15_Bugs-and-Problems.aspx|Bugs & Problems] |} There are several main known issues about graphs: * grids are available in power of two only; * axes limits are available by mouse wheel only; * 3D plots loose alignments opening the worksheet; * 3D coordinates are left-handed; {BR}[anchor|#History] ==History== * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=450|0.78] (stable): Added ability to Zoom graphs by mouse wheel; * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=870|0.82.3477] (stable): Added ability to plot multiple graphs on the canvas (2D & 3D): multiple Graphs can be specified by functions or/and points at the same time; +/- and -/+ operators also can be used; 2D Graphs now can be inserted into the page by pressing "@" symbol; * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=1013|0.85] (stable): Added ability to separately change axis scale factor on 2D graphs using Ctrl/Shift + Mouse Wheel; * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=3596|0.89.8] (Beta): Added ability to draw text and special characters on the 2D Plot Control canvas; * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=5857|0.90] (stable): Graph animation implemented; Plot 2D and Plot 3D buttons removed from the math toolbar panel; * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=6807|0.94] (stable): Added support for colors specifying for the special objects and strings into the Plot Region using web format (like "#6699CC"); {BR}[anchor|#SeeAlso] ==See also== * [Animations|Animations] * [Matrices|Matrices] * [error|error] {BR}[anchor|#References] ==References== Tutorials and examples: * Graphs Basics ([{UP}Tutorials%2fGraphsBasics10152010.pdf|PDF]|[{UP}Tutorials%2fGraphsBasics10152010.zip|zip]) * [{UP}Tutorials%2fSMathStudioGraphs2%263DExamples.pdf|Examples of 2D & 3D graphs v0.85 (pdf)] * [{UP}graphs%2fgraphs%20wiki.zip|Graphs wiki] (plots shown in this page) [anchor|#color snippets]Color snippets (to help with color handling): * [{UP}graphs%2fwebColors.zip|Color Snippet (hexadecimal with alpha channel)] * [{UP}graphs%2fRGBcolor.zip|Color Snippet (RGB with 0-255 alpha channel)] * [{UP}graphs%2fRGB-RGBA colors.zip|Color Snippet (RGB and RGBA with CSS3 compatible behavior)]
ScrewTurn Wiki
version 2.0.37. Some of the icons created by
FamFamFam
.