1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on April, 24 2010 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>
-->
<head>
<title>Maxima 5.21.1 Manual: 8. Plotting</title>
<meta name="description" content="Maxima 5.21.1 Manual: 8. Plotting">
<meta name="keywords" content="Maxima 5.21.1 Manual: 8. Plotting">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
color: black;
background: white;
margin-left: 8%;
margin-right: 13%;
}
h1
{
margin-left: +8%;
font-size: 150%;
font-family: sans-serif
}
h2
{
font-size: 125%;
font-family: sans-serif
}
h3
{
font-size: 100%;
font-family: sans-serif
}
h2,h3,h4,h5,h6 { margin-left: +4%; }
div.textbox
{
border: solid;
border-width: thin;
/* width: 100%; */
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em
}
div.titlebox
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
background: rgb(200,255,255);
font-family: sans-serif
}
div.synopsisbox
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
background: rgb(255,220,255);
/*background: rgb(200,255,255); */
/* font-family: fixed */
}
pre.example
{
border: 1px solid gray;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
/* background: rgb(247,242,180); */ /* kind of sandy */
/* background: rgb(200,255,255); */ /* sky blue */
background-color: #F1F5F9; /* light blue-gray */
/* font-family: "Lucida Console", monospace */
}
div.spacerbox
{
border: none;
padding-top: 2em;
padding-bottom: 2em
}
div.image
{
margin: 0;
padding: 1em;
text-align: center;
}
div.categorybox
{
border: 1px solid gray;
padding-top: 0px;
padding-bottom: 0px;
padding-left: 1em;
padding-right: 1em;
background: rgb(247,242,220);
}
-->
</style>
<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Plotting"></a>
<a name="SEC31"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_7.html#SEC30" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC32" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima_7.html#SEC29" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 8. Plotting </h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC32">8.1 Introduction to Plotting</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC33">8.2 Plotting Formats</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC34">8.3 Functions and Variables for Plotting</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC35">8.4 Plotting Options</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC36">8.5 Gnuplot Options</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC37">8.6 Gnuplot_pipes Format Functions</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<p><a name="Item_003a-Introduction-to-Plotting"></a>
</p><hr size="6">
<a name="Introduction-to-Plotting"></a>
<a name="SEC32"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC33" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 8.1 Introduction to Plotting </h2>
<p>Maxima uses an external plotting package to make the plots (see the
section on Plotting formats). The plotting functions calculate a set of
points and pass them to the plotting package together with a set of
commands. That information can be passed to the external program either
through a pipe or by calling the program with the name of a file where
the data has been saved. The data file is given the name
<code>maxout.interface</code>, where <code>interface</code> is the name of the
plotting interface being used (gnuplot, xmaxima, mgnuplot or
gnuplot_pipes).
</p>
<p>The <code>maxout.interface</code> file, in the cases when it is used, is
created in the directory specified by the system variable
<var>maxima_tempdir</var>. That location can be changed; by assigning to that
variable a string that represents a valid directory where Maxima can
create new files.
</p>
<p>After a plot has been created, the file <code>maxout.interface</code> can be
executed again with the appropriate external program. If a Maxima plotting
command fails to show anything, that file can be inspected to look for
possible sources of problems.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
<p><a name="Item_003a-Plotting-Formats"></a>
</p><hr size="6">
<a name="Plotting-Formats"></a>
<a name="SEC33"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC32" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC34" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 8.2 Plotting Formats </h2>
<p>There are currently two external plotting programs that Maxima use: Gnuplot
and Xmaxima. There are various different formats for those programs,
which can be selected with the option <code>plot_format</code> (see
the Plotting Options section).
</p>
<p>The plotting formats are the following:
</p>
<ul>
<li>
<strong>gnuplot</strong> (default on Windows)
<p>Used to launch the external program gnuplot, which must be installed in
your system. All plotting commands and data are saved into the file
<code>maxout.gnuplot</code>.
</p>
</li><li>
<strong>gnuplot_pipes</strong> (default on non-Windows platforms)
<p>This format is not available in Windows platforms.
It is similar to the <code>gnuplot</code> format except that the commands are sent
to gnuplot through a pipe, while the data are saved into the file
<code>maxout.gnuplot_pipes</code>. A single gnuplot process is kept open
and subsequent plot commands will be sent to the same process, replacing
previous plots, unless the gnuplot pipe is closed with the function
<code>gnuplot_close()</code>. When this format is used, the function
<code>gnuplot_replot</code> can be used to modify a plot that has already
displayed on the screen (see <code>gnuplot_replot</code>).
</p>
<p>This format should only be used to plot to the
screen; for plotting to files it is better to use the <code>gnuplot</code>
format.
</p>
</li><li>
<strong>mgnuplot</strong>
<p>Mgnuplot is a Tk-based wrapper around gnuplot. It is included in the
Maxima distribution. Mgnuplot offers a rudimentary GUI for gnuplot,
but has fewer overall features than the plain gnuplot
interface. Mgnuplot requires an external gnuplot installation and, in
Unix systems, the Tcl/Tk system.
</p>
</li><li>
<strong>xmaxima</strong>
<p>Xmaxima is a Tcl/Tk graphical interface for Maxima that can also be used
to display plots created when Maxima is run from the console or from other
graphical interfaces. To use this format, the xmaxima program, which is
distributed together with Maxima, should be installed. If Maxima is
being run from xmaxima itself, this format will make the plot functions
send the data and commands through the same socket used for the
communication between Maxima and Xmaxima. When used from the console
or from other interface, the commands and data will be saved in the file
<code>maxout.xmaxima</code>, and the xmaxima program will be launched with the
name of the location of that file as argument.
</p>
<p>In previous versions this format used to be called <code>openmath</code>; that
old name will still be accepted as a synonym for <code>xmaxima</code>.
</p>
</li></ul>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
<p><a name="Item_003a-Functions-and-Variables-for-Plotting"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Plotting"></a>
<a name="SEC34"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC33" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC35" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 8.3 Functions and Variables for Plotting </h2>
<p><a name="Item_003a-contour_005fplot"></a>
</p><dl>
<dt><u>Function:</u> <b>contour_plot</b><i> (<var>expr</var>, <var>x_range</var>, <var>y_range</var>, <var>options</var>, ...)</i>
<a name="IDX250"></a>
</dt>
<dd><p>It plots the contours (curves of equal value) of <var>expr</var>
over the region <var>x_range</var> by <var>y_range</var>.
Any additional arguments are treated the same as in <code>plot3d</code>.
</p>
<p>This function only works when the plot format is either <code>gnuplot</code>
or <code>gnuplot_pipes</code>. The additional package <code>implicit_plot</code> can
also be used to plot contours and it works for any format. See
<code>implicit_plot</code>.
</p>
<p>Examples:
</p>
<pre class="example">(%i1) contour_plot (x^2 + y^2, [x, -4, 4], [y, -4, 4])$
</pre>
<p><div class="image"><img src="./figures/contour1.gif" alt="figures/contour1"></div>
</p>
<pre class="example">(%i1) F(x, y) := x^3 + y^2;
3 2
(%o1) F(x, y) := x + y
(%i2) contour_plot (F, [u, -4, 4], [v, -4, 4])$
</pre>
<p><div class="image"><img src="./figures/contour2.gif" alt="figures/contour2"></div>
</p>
<p>You can add any options accepted by <code>plot3d</code>; for instance, the
option <code>legend</code> with a value of false, to remove the
legend. Gnuplot chooses, by default, 3 contours to show. to increase the
number of levels, it is necessary to specify a custom gnuplot preamble:
</p>
<pre class="example">(%i1) contour_plot (u^3 + v^2, [u, -4, 4], [v, -4, 4],
(%i2) [legend,false], [gnuplot_preamble,"set cntrparam levels 12"])$
</pre>
<p><div class="image"><img src="./figures/contour3.gif" alt="figures/contour3"></div>
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-get_005fplot_005foption"></a>
</p><dl>
<dt><u>Function:</u> <b>get_plot_option</b><i> (<var>keyword</var>, <var>index</var>)</i>
<a name="IDX251"></a>
</dt>
<dd><p>Returns a value of the option with name <var>keyword</var>, stored in the
global variable <code>plot_options</code>. A value of 1 for the index will
return the keyword itself; a value of 2 turn returns the first parameter
following the keyword, and so on.
</p>
<p>See also <code>plot_options</code>, <code>set_plot_option</code> and the section on
Plotting Options.
</p>
</dd></dl>
<p><a name="Item_003a-make_005ftransform"></a>
</p><dl>
<dt><u>Function:</u> <b>make_transform</b><i> ([<var>var1</var>, <var>var2</var>, <var>var3</var>], <var>fx</var>, <var>fy</var>, <var>fz</var>)</i>
<a name="IDX252"></a>
</dt>
<dd><p>Returns a function suitable to be used in the option <code>transform_xy</code>
of plot3d. The three variables <var>var1</var>, <var>var2</var>, <var>var3</var> are
three dummy variable names, which represent the 3 variables given by the
plot3d command (first the two independent variables and then the
function that depends on those two variables). The three functions
<var>fx</var>, <var>fy</var>, <var>fz</var> must depend only on those 3 variables, and
will give the corresponding x, y and z coordinates that should be
plotted. There are two transformations defined by default:
<code>polar_to_xy</code> and <code>spherical_to_xyz</code>; see the documentation
for those two transformations.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-polar_005fto_005fxy"></a>
</p><dl>
<dt><u>System function:</u> <b>polar_to_xy</b>
<a name="IDX253"></a>
</dt>
<dd><p>It can be given as value for the <code>transform_xy</code> option of
plot3d. Its effect will be to interpret the two independent variables in
plot3d as the distance from the z axis and the azimuthal angle (polar
coordinates), and transform them into x and y coordinates.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-plot2d"></a>
</p><dl>
<dt><u>Function:</u> <b>plot2d</b><i> (<var>plot</var>, <var>x_range</var>, ..., <var>options</var>, ...)</i>
<a name="IDX254"></a>
</dt>
<dt><u>Function:</u> <b>plot2d</b><i> ([<var>plot_1</var>, ..., <var>plot_n</var>], ..., <var>options</var>, ...)</i>
<a name="IDX255"></a>
</dt>
<dt><u>Function:</u> <b>plot2d</b><i> ([<var>plot_1</var>, ..., <var>plot_n</var>], <var>x_range</var>,..., <var>options</var>, ...)</i>
<a name="IDX256"></a>
</dt>
<dd><p>Where <var>plot</var>, <var>plot_1</var>, ..., <var>plot_n</var> can be either
expressions, function names or a list with
the any of the forms: <code>[discrete, [<var>x1</var>, ..., <var>xn</var>],
[<var>y1</var>, ..., <var>yn</var>]]</code>, <code>[discrete, [[<var>x1</var>, <var>y1</var>],
..., [<var>xn</var>, ..., <var>yn</var>]]</code> or <code>[parametric, <var>x_expr</var>,
<var>y_expr</var>, <var>t_range</var>]</code>.
</p>
<p>Displays a plot of one or more expressions as a function of one
variable or parameter.
</p>
<p><code>plot2d</code> displays one or several plots in two dimensions. When
expressions or function name are used to define the plots,
they should all depend on only one variable <var>var</var> and the use of
<var>x_range</var> will be mandatory, to provide the name of the variable and
its minimum and maximum values; the syntax for <var>x_range</var> is:
<code>[<var>variable</var>, <var>min</var>, <var>max</var>]</code>.
</p>
<p>A plot can also be defined in the discrete or parametric forms. The
discrete form is used to plot a set of points with given coordinates. A
discrete plot is defined by a list starting with the keyword
<var>discrete</var>, followed by one or two lists of values. If two lists are
given, they must have the same length; the first list will be
interpreted as the x coordinates of the points to be plotted and the
second list as the y coordinates. If only one list is given after the
<var>discrete</var> keyword, each element on the list should also be a list
with two values that correspond to the x and y coordinates of a point.
</p>
<p>A parametric plot is defined by a list starting with the keyword
<var>parametric</var>, followed by two expressions or function names and a
range for the parameter. The range for the parameter must be a list with
the name of the parameter followed by its minimum and maximum values:
<code>[<var>param</var>, <var>min</var>, <var>max</var>]</code>. The plot will show the path
traced out by the point with coordinates given by the two expressions or
functions, as <var>param</var> increases from <var>min</var> to <var>max</var>.
</p>
<p>A range for the vertical axis is an optional argument with the form:
<code>[y, <var>min</var>, <var>max</var>]</code> (the keyword <var>y</var> is always used for
the vertical axis). If that option is used, the plot will show that
exact vertical range, independently of the values reached by the plot.
If the vertical range is not specified, it will be set up according to
the minimum and maximum values of the second coordinate of the plot
points.
</p>
<p>All other options should also be lists, starting with a keyword and
followed by one or more values. See <code>plot_options</code>.
</p>
<p>If there are several plots to be plotted, a legend will be
written to identiy each of the expressions. The labels that should be
used in that legend can be given with the option <var>legend</var>. If that
option is not used, Maxima will create labels from the expressions or
function names.
</p>
<p><strong>Examples:</strong>
</p>
<p>Plot of a common function:
</p><pre class="example">(%i1) plot2d (sin(x), [x, -%pi, %pi])$
</pre>
<p><div class="image"><img src="./figures/plotting2.gif" alt="figures/plotting2"></div>
</p>
<p>If the functions grows too fast, it might be necessary to limit the
values in the vertical axis using the y option:
</p><pre class="example">(%i1) plot2d (sec(x), [x, -2, 2], [y, -20, 20])$
plot2d: some values were clipped.
</pre>
<p><div class="image"><img src="./figures/plotting3.gif" alt="figures/plotting3"></div>
</p>
<p>The aspect of the plot might be different depending on the plotting
program used. For instance, when the plot box is disable, Xmaxima will
plot the axes using arrows:
</p><pre class="example">(%i1) plot2d ( x^2-1, [x, -3, 3], [y, -2, 10], [box, false],
[plot_format, xmaxima])$
</pre>
<p><div class="image"><img src="./figures/plotting1.gif" alt="figures/plotting1"></div>
</p>
<p>A plot with a logarithmic scale:
</p><pre class="example">(%i1) plot2d (exp(3*s), [s, -2, 2], [logy])$
</pre>
<p><div class="image"><img src="./figures/plotting4.gif" alt="figures/plotting4"></div>
</p>
<p>Plotting functions by name:
</p><pre class="example">(%i1) F(x) := x^2 $
(%i2) :lisp (defun |$g| (x) (m* x x x))
$g
(%i2) H(x) := if x < 0 then x^4 - 1 else 1 - x^5 $
(%i3) plot2d ([F, G, H], [u, -1, 1], [y, -1.5, 1.5])$
</pre>
<p><div class="image"><img src="./figures/plotting5.gif" alt="figures/plotting5"></div>
</p>
<p>A plot of the butterfly curve, defined parametrically:
</p><pre class="example">(%i1) r: (exp(cos(t))-2*cos(4*t)-sin(t/12)^5)$
(%i2) plot2d([parametric, r*sin(t), r*cos(t), [t, -8*%pi, 8*%pi],
[nticks, 2000]])$
</pre>
<p><div class="image"><img src="./figures/plotting6.gif" alt="figures/plotting6"></div>
</p>
<p>A "circle" with two turns, when plotted with only 7 points:
</p>
<pre class="example">(%i1) plot2d ([parametric, cos(t), sin(t), [t, -2*%pi, 2*%pi],
[nticks, 8]])$
</pre>
<p><div class="image"><img src="./figures/plotting7.gif" alt="figures/plotting7"></div>
</p>
<p>Plot of a common function together with the parametric representation of
a circle. The size of the plot has been adjusted with the x and y
options, to make the circle look round and not deformed as an ellipse.
These values work well for the Postscript terminal used to produce this
plot; you might have to adjust the values for your screen.
</p>
<pre class="example">(%i1) plot2d([[parametric, cos(t), sin(t) ,[t,0,2*%pi],
[nticks, 80]], abs(x)], [x,-2,2], [y, -1.5, 1.5])$
plot2d: some values were clipped.
</pre>
<p><div class="image"><img src="./figures/plotting8.gif" alt="figures/plotting8"></div>
</p>
<p>A plot of a discrete set of points, defining x and y coordinates separately:
</p><pre class="example">(%i1) plot2d ( [ discrete, [10, 20, 30, 40, 50],
[.6, .9, 1.1, 1.3, 1.4]] )$
</pre>
<p><div class="image"><img src="./figures/plotting9.gif" alt="figures/plotting9"></div>
</p>
<p>The same points shown in the previous example, defining each point
separately and without any lines joining the points:
</p><pre class="example">(%i1) plot2d([discrete, [[10, .6], [20, .9], [30, 1.1], [40, 1.3],
[50, 1.4]]], [style, points])$
</pre>
<p><div class="image"><img src="./figures/plotting10.gif" alt="figures/plotting10"></div>
</p>
<p>In this example, a table with three columns is saved in a file
"data.txt" which is then read and the second and third column are
plotted on the two axes:
</p><pre class="example">(%i1) with_stdout ("data.txt",
for x:0 thru 10 do print (x, x^2, x^3))$
(%i2) data: transpose ( read_matrix ("data.txt"))$
(%i3) plot2d ([discrete, data[2], data[3]],
[style,points], [point_type,diamond], [color,red])$
</pre>
<p><div class="image"><img src="./figures/plotting11.gif" alt="figures/plotting11"></div>
</p>
<p>A plot of experimental data points together with the theoretical
function that predicts the data:
</p><pre class="example">(%i1) xy: [[10, .6], [20, .9], [30, 1.1], [40, 1.3], [50, 1.4]]$
(%i2) plot2d([[discrete, xy], 2*%pi*sqrt(l/980)], [l,0,50],
[style, points, lines], [color, red, blue],
[point_type, asterisk], [legend, "experiment", "theory"],
[xlabel, "pendulum's length (cm)"], [ylabel, "period (s)"])$
</pre>
<p><div class="image"><img src="./figures/plotting12.gif" alt="figures/plotting12"></div>
</p>
<p>See also the section about Plotting Options.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-plot3d"></a>
</p><dl>
<dt><u>Function:</u> <b>plot3d</b><i> (<var>expr</var>, <var>x_range</var>, <var>y_range</var>, ..., <var>options</var>, ...)</i>
<a name="IDX257"></a>
</dt>
<dt><u>Function:</u> <b>plot3d</b><i> ([<var>expr_1</var>, ..., <var>expr_n</var>], <var>x_range</var>, <var>y_range</var>, ..., <var>options</var>, ...)</i>
<a name="IDX258"></a>
</dt>
<dd><p>Displays a plot of one or more surfaces defined as functions of two
variables or in parametric form.
</p>
<p>The functions to be plotted may be specified as expressions or function
names.
The mouse can be used to rotate the plot looking at the surface
from different sides.
</p>
<p><strong>Examples:</strong>
</p>
<p>Plot of a common function:
</p><pre class="example">(%i1) plot3d (2^(-u^2 + v^2), [u, -3, 3], [v, -2, 2])$
</pre>
<p><div class="image"><img src="./figures/plotting13.gif" alt="figures/plotting13"></div>
</p>
<p>Use of the z option to limit a function that goes to infinity (in this
case the function is minus infinity on the x and y axes); this also
shows how to plot with only lines and no shading:
</p><pre class="example">(%i1) plot3d ( log ( x^2*y^2 ), [x, -2, 2], [y, -2, 2], [z, -8, 4],
[palette, false], [color, magenta, blue])$
</pre>
<p><div class="image"><img src="./figures/plotting14.gif" alt="figures/plotting14"></div>
</p>
<p>The infinite values of z can also be avoided by choosing a grid that
does not fall on any asymptotes; this example also shows how to select
one of the predefined palettes, in this case the fourth one:
</p><pre class="example">(%i1) plot3d(log(x^2*y^2), [x, -2, 2], [y, -2, 2], [grid, 29, 29],
[palette, get_plot_option(palette,5)])$
</pre>
<p><div class="image"><img src="./figures/plotting15.gif" alt="figures/plotting15"></div>
</p>
<p>Two surfaces in the same plot, sharing the same domain; in gnuplot the
two surfaces will use the same palette:
</p><pre class="example">(%i1) plot3d ( [2^(-x^2 + y^2), 4*sin(3*(x^2+y^2))/(x^2+y^2),
[x, -3, 3], [y, -2, 2]])$
</pre>
<p><div class="image"><img src="./figures/plotting16.gif" alt="figures/plotting16"></div>
</p>
<p>The same two surfaces, but now with different domains; in xmaxima each
surface will use a different palette, chosen from the list defined by
the option palette:
</p><pre class="example">(%i1) plot3d ( [[2^(-x^2 + y^2),[x,-2,2],[y,-2,2]],
4*sin(3*(x^2+y^2))/(x^2+y^2), [x, -3, 3], [y, -2, 2]],
[plot_format,xmaxima])$
</pre>
<p><div class="image"><img src="./figures/plotting17.gif" alt="figures/plotting17"></div>
</p>
<p>Plot of a Klein bottle, defined parametrically:
</p><pre class="example">(%i1) e_1: 5*cos(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0)-10.0$
(%i2) e_2: -5*sin(x)*(cos(x/2)*cos(y)+sin(x/2)*sin(2*y)+3.0)$
(%i3) e_3: 5*(-sin(x/2)*cos(y)+cos(x/2)*sin(2*y))$
(%i4) plot3d ([e_1, e_2, e_3], [x, -%pi, %pi],
[y, -%pi, %pi], [grid, 40, 40])$
</pre>
<p><div class="image"><img src="./figures/plotting18.gif" alt="figures/plotting18"></div>
</p>
<p>Plot of a spherical harmonic, using of the predefined transformations,
<code>spherical_to_xyz</code>, to transform from spherical to rectangular
coordinates. See the documentation for <code>spherical_to_xyz</code>.
</p><pre class="example">(%i1) plot3d (sin(2*theta)*cos(phi), [theta,0,%pi], [phi,0,2*%pi],
[transform_xy, spherical_to_xyz], [grid,30,60])$
</pre>
<p><div class="image"><img src="./figures/plotting19.gif" alt="figures/plotting19"></div>
</p>
<p>Use of the predefined function <code>polar_to_xy</code> to transform from
cylindrical to rectangular coordinates. See the documentation for
<code>polar_to_xy</code>. This example also shows how to eliminate the
bounding box and the legend.
</p><pre class="example">(%i1) plot3d(r^.33*cos(th/3), [r,0,1], [th,0,6*%pi], [grid,12,80],
[transform_xy, polar_to_xy], [box, false], [legend,false])$
</pre>
<p><div class="image"><img src="./figures/plotting20.gif" alt="figures/plotting20"></div>
</p>
<p>Plot of a sphere using the transformation from spherical to rectangular
coordinates. In xmaxima the three axes are scaled in the same
proportion, maintaining the symmetric shape of the sphere. A palette with
different shades of a single color is used:
</p><pre class="example">(%i1) plot3d (5, [theta, 0, %pi], [phi, 0, 2*%pi],
[transform_xy, spherical_to_xyz], [plot_format,xmaxima],
[palette,[value,0.65,0.7,0.1,0.9]])$
</pre>
<p><div class="image"><img src="./figures/plotting21.gif" alt="figures/plotting21"></div>
</p>
<p>Definition of a function of two-variables using a matrix. Notice the
single quote in the definition of the function, to prevent plot3d from
failing when it realizes that the matrix will require integer indices.
</p><pre class="example">(%i1) M: matrix([1,2,3,4], [1,2,3,2], [1,2,3,4], [1,2,3,3])$
(%i2) f(x, y) := float('M [round(x), round(y)])$
(%i3) plot3d (f(x,y), [x, 1, 4], [y, 1, 4], [grid, 4, 4])$
apply: subscript must be an integer; found: round(x)
</pre>
<p><div class="image"><img src="./figures/plotting22.gif" alt="figures/plotting22"></div>
</p>
<p>By setting the elevation equal to zero, a surface can be seen as a map
in which each color represents a different level. The option
<code>colorbox</code> is used to show the correspondence among colors and
levels, and the mesh lines are disabled to make the colors easier to see.
</p><pre class="example">(%i1) plot3d (cos (-x^2 + y^3/4), [x, -4, 4], [y, -4, 4],
[mesh_lines_color, false], [elevation, 0], [azimuth, 0],
[colorbox, true], [grid, 150, 150])$
</pre>
<p><div class="image"><img src="./figures/plotting23.gif" alt="figures/plotting23"></div>
</p>
<p>See also the section about Plotting Options.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-plot_005foptions"></a>
</p><dl>
<dt><u>System variable:</u> <b>plot_options</b>
<a name="IDX259"></a>
</dt>
<dd><p>Elements of this list state the default options for plotting.
If an option is present in a <code>plot2d</code> or <code>plot3d</code> call,
that value takes precedence over the default option.
Otherwise, the value in <code>plot_options</code> is used.
Default options are assigned by <code>set_plot_option</code>. There are other
local options specific to each plotting command, and not included in
this list of global options.
</p>
<p>Each element of <code>plot_options</code> is a list of two or more items. The
first item is the name of the option, and the remainder comprises the
value or values assigned to the option. In some cases, the assigned
value is a list, which may include several items.
</p>
<p>See also <code>set_plot_option</code>, <code>get_option</code> and the section on
Plotting Options.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-set_005fplot_005foption"></a>
</p><dl>
<dt><u>Function:</u> <b>set_plot_option</b><i> (<var>option</var>)</i>
<a name="IDX260"></a>
</dt>
<dd><p>Accepts most of the options listed in the section Plotting Options, and
saves them into the global variable <code>plot_options</code>.
</p>
<p><code>set_plot_option</code> evaluates its argument and returns the complete
list <code>plot_options</code> (after modifying the option given).
</p>
<p>See also <code>plot_options</code>, <code>get_option</code> and the section on
Plotting Options.
</p>
<p>Example:
</p>
<p>Modification of the <code>grid</code> values.
</p>
<pre class="example">(%i1) set_plot_option ([grid, 30, 40]);
(%o1) [[t, - 3, 3], [grid, 30, 40], [transform_xy, false],
[run_viewer, true], [axes, true], [plot_format, gnuplot_pipes],
[color, blue, red, green, magenta, black, cyan],
[point_type, bullet, circle, plus, times, asterisk, box, square,
triangle, delta, wedge, nabla, diamond, lozenge],
[palette, [hue, 0.25, 0.7, 0.8, 0.5],
[hue, 0.65, 0.8, 0.9, 0.55], [hue, 0.55, 0.8, 0.9, 0.4],
[hue, 0.95, 0.7, 0.8, 0.5]], [gnuplot_term, default],
[gnuplot_out_file, false], [nticks, 29], [adapt_depth, 5],
[gnuplot_preamble, ], [gnuplot_default_term_command,
set term pop], [gnuplot_dumb_term_command, set term dumb 79 22],
[gnuplot_ps_term_command, set size 1.5, 1.5;set term postscript \
eps enhanced color solid 24], [plot_realpart, false]]
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-spherical_005fto_005fxyz"></a>
</p><dl>
<dt><u>System function:</u> <b>spherical_to_xyz</b>
<a name="IDX261"></a>
</dt>
<dd><p>It can be given as value for the <code>transform_xy</code> option of
plot3d. Its effect will be to interpret the two independent variables
and the function in plot3d as the spherical coordinates of a point
(first, the angle with the z axis, then the angle of the xy projection
with the x axis and finally the distance from the origin) and transform
them into x, y and z coordinates.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-Plotting-Options"></a>
</p><hr size="6">
<a name="Plotting-Options"></a>
<a name="SEC35"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC34" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC36" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 8.4 Plotting Options </h2>
<p>All options consist of a list starting with one of the keywords in this
section, followed by one or more values. Most of the options can be used
in any of the plotting commands (<var>plot2d</var>, <var>plot3d</var>, <var>contour_plot</var>,
<var>implicit_plot</var>) or in the function <var>set_plot_option</var>; the
exceptions will be specified in the following list.
</p>
<p><a name="Item_003a-adapth_005fdepth"></a>
</p><dl>
<dt><u>Plot option:</u> <b>adapth_depth</b><i> [adapth_depth, <var>integer</var>]</i>
<a name="IDX262"></a>
</dt>
<dd><p>The maximum number of splittings used by the adaptive plotting routine.
</p>
<p>Default value: 5
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-axes"></a>
</p><dl>
<dt><u>Plot option:</u> <b>axes</b><i> [axes, <var>symbol</var>] </i>
<a name="IDX263"></a>
</dt>
<dd><p>Where <var>symbol</var> can be either <code>true</code>, <code>false</code>, <code>x</code> or
<code>y</code>. If <code>false</code>, no axes will be shown; if equal to <code>x</code>
or <code>y</code> only the x or y axis will be shown, and if it is equal to
<code>true</code>, both axes will be shown. This option is used only by plot2d
and implicit_plot.
</p>
<p>Default value: true
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-azimut"></a>
</p><dl>
<dt><u>Plot option:</u> <b>azimut</b><i> [azimuth, <var>number</var>]</i>
<a name="IDX264"></a>
</dt>
<dd><p>A plot3d plot can be thought of as starting with its x and y axis
in the horizontal and vertical axis, as in plot2d, and the z axis
coming out of the paper perpendicularly. The z axis is then rotated
around the x axis an angle equals to <code>elevation</code> and then the xy
plane is rotated around the new z axis an angle <code>azimuth</code>. This
option sets the value for the azimuth, in degrees.
</p>
<p>Default value: 30
</p>
<p>See also <code>elevation</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<dl>
<dt><u>Plot option:</u> <b>box</b><i> [box, <var>symbol</var>]</i>
<a name="IDX265"></a>
</dt>
<dd><p>If set to <code>true</code>, a bounding box will be drawn for the plot; if set
to <code>false</code>, no box will be drawn.
</p>
<p>Default value: <code>true</code>
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-color"></a>
</p><dl>
<dt><u>Plot option:</u> <b>color</b><i> [color, <var>color_1</var>, ..., <var>color_n</var>]</i>
<a name="IDX266"></a>
</dt>
<dd><p>In plot2d and implicit_plot, it defines the color (or colors) for the
various curves. In plot3d, it defines the colors used for the mesh lines
of the surfaces, when no palette is being used; one side of the surface
will have color <var>color_1</var> and the other <var>color_2</var> (or the same
color if there is only one color).
</p>
<p>If there are more curves or surfaces than colors, the colors will be repeated in
sequence. When using gnuplot, the colors could be: blue, red, green,
magenta, black, cyan or black; in xmaxima the colors can be those or a
string starting with the character # and followed by six hexadecimal
digits: two for the red component, two for green component and two for
the blue component. If given the name of an unknown color, black will be
used instead.
</p>
<p>Default value: blue, red, green, magenta, black, cyan
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-colorbox"></a>
</p><dl>
<dt><u>Plot option:</u> <b>colorbox</b><i> [colorbox, <var>symbol</var>]</i>
<a name="IDX267"></a>
</dt>
<dd><p>Where <var>symbol</var> can be either <code>true</code> or <code>false</code>. If
<code>true</code>, whenever plot3d uses a palette of different colors to
represent the different values of z, a box will be shown on the right,
indicating the colors used according to the scale of values of z. This
option does not work in xmaxima.
</p>
<p>Default value: <code>false</code>
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-elevation"></a>
</p><dl>
<dt><u>Plot option:</u> <b>elevation</b><i> [elevation, <var>number</var>]</i>
<a name="IDX268"></a>
</dt>
<dd><p>A plot3d plot can be thought of as starting with its x and y axis
in the horizontal and vertical axis, as in plot2d, and the z axis
coming out of the paper perpendicularly. The z axis is then rotated
around the x axis an angle equals to <code>elevation</code> and then the xy
plane is rotated around the new z axis an angle <code>azimuth</code>. This
option sets the value for the elevation, in degrees.
</p>
<p>Default value: 60
</p>
<p>See also <code>azimuth</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-grid"></a>
</p><dl>
<dt><u>Plot option:</u> <b>grid</b><i> [grid, <var>integer</var>, <var>integer</var>]</i>
<a name="IDX269"></a>
</dt>
<dd><p>Sets the number of grid points to use in the x- and y-directions
for three-dimensional plotting.
</p>
<p>Default value: 30, 30
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-legend"></a>
</p><dl>
<dt><u>Plot option:</u> <b>legend</b><i> [legend, <var>string_1</var>, ..., <var>string_n</var>]</i>
<a name="IDX270"></a>
</dt>
<dt><u>Plot option:</u> <b>legend</b><i> [legend, <var>false</var>]</i>
<a name="IDX271"></a>
</dt>
<dd><p>It specifies the labels for the plots when various plots are shown. If
there are more plots than the number of labels given, they will be
repeated. If given the value <code>false</code>, no legends will be shown. By
default, the names of the expressions or functions will be used, or the
words discrete1, discrete2, ..., for discrete sets of points. This
option can not be set with <var>set_plot_option</var>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-logx"></a>
</p><dl>
<dt><u>Plot option:</u> <b>logx</b><i> [logx]</i>
<a name="IDX272"></a>
</dt>
<dd><p>Makes the horizontal axes to be scaled logarithmically. It can not be
used with <var>set_plot_option</var>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-logy"></a>
</p><dl>
<dt><u>Plot option:</u> <b>logy</b><i> [logy]</i>
<a name="IDX273"></a>
</dt>
<dd><p>Makes the vertical axes to be scaled logarithmically. It can not be used
with <var>set_plot_option</var>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-mesh_005flines_005fcolor"></a>
</p><dl>
<dt><u>Plot option:</u> <b>mesh_lines_color</b><i> [mesh_lines_color, <var>color</var>]</i>
<a name="IDX274"></a>
</dt>
<dd><p>It sets the color used by plot3d to draw the mesh lines, when a palette is
being used. It accepts the same colors as for the option <code>color</code>
(see the list of allowed colors in <code>color</code>). It can also be given a
value <code>false</code> to eliminate completely the mesh lines.
</p>
<p>Default value: black
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-nticks"></a>
</p><dl>
<dt><u>Plot option:</u> <b>nticks</b><i> [nticks, <var>integer</var>]</i>
<a name="IDX275"></a>
</dt>
<dd><p>When plotting functions with plot2d, it is gives the initial number of
points used by the adaptive plotting routine for plotting
functions. When plotting parametric functions with plot2d or plot3d,
it sets the number of points that will be shown for the plot.
</p>
<p>Default value: 29
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-palette"></a>
</p><dl>
<dt><u>Plot option:</u> <b>palette</b><i> [palette, [<var>palette_1</var>], ..., [<var>palette_n</var>]]</i>
<a name="IDX276"></a>
</dt>
<dt><u>Plot option:</u> <b>palette</b><i> [palette, <var>false</var>]</i>
<a name="IDX277"></a>
</dt>
<dd><p>It can consist of one palette or a list of several palettes. Each
palette is a list with a keyword followed by four numbers. The first
three numbers, which must be between 0 and 1, define the hue, saturation
and value of a basic color to be assigned to the minimum value of z. The
keyword specifies which of the three attributes (hue, saturation or
value) will be increased according to the values of z. The last number
indicates the increase corresponding to the maximum value of z. That
last number can be bigger than 1 or negative; the corresponding values
of the modified attribute will be rounded modulo 1.
</p>
<p>Gnuplot only uses the first palette in the list; xmaxima will use the
palettes in the list sequentially, when several surfaces are plotted
together; if the number of palettes is exhausted, they will be repeated
sequentially.
</p>
<p>The color of the mesh lines will be given by the option
<code>mesh_lines_color</code>. If <code>palette</code> is given the value
<code>false</code>, the surfaces will not be shaded but represented with a
mesh of curves only. In that case, the colors of the lines will be
determined by the option <code>color</code>.
</p>
<p>Default value: [hue, 0.25, 0.7, 0.8, 0.5], [hue, 0.65, 0.8, 0.9, 0.55], [hue, 0.55, 0.8, 0.9, 0.4], [hue, 0.95, 0.7, 0.8, 0.5]
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-plot_005fformat"></a>
</p><dl>
<dt><u>Plot option:</u> <b>plot_format</b><i> [plot_format, <var>format</var>]</i>
<a name="IDX278"></a>
</dt>
<dd><p>Where <var>format</var> is one of the following: gnuplot, xmaxima, mgnuplot or
gnuplot_pipes.
</p>
<p>It sets the format to be used for plotting.
</p>
<p>Default value: gnuplot, in Windows systems, or gnuplot_pipes in other systems.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-plot_005freal_005fpart"></a>
</p><dl>
<dt><u>Plot option:</u> <b>plot_real_part</b><i> [plot_realpart, <var>symbol</var>]</i>
<a name="IDX279"></a>
</dt>
<dd><p>When set to <code>true</code>, the functions to be plotted will be considered
as complex functions whose real value should be plotted; this is
equivalent to plotting <code>realpart(<var>function</var>)</code>. I set to
<code>false</code>, nothing will be plotted when the function does not give a
real value. For instance, when <code>x</code> is negative, <code>log(x)</code> gives
a complex value, with real value equal to <code>log(abs(x))</code>; if
<code>plot_real_part</code> were <code>true</code>, <code>log(-5)</code> would be plotted
as <code>log(5)</code>, while nothing would be plotted if
<code>plot_real_part</code> were <code>false</code>.
</p>
<p>Default value: <code>false</code>
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-point_005ftype"></a>
</p><dl>
<dt><u>Plot option:</u> <b>point_type</b><i> [point_type, <var>type_1</var>, ..., <var>type_n</var>]</i>
<a name="IDX280"></a>
</dt>
<dd><p>In gnuplot, each set of points to be plotted with the style "points"
or "linespoints" will be represented with objects taken from this
list, in sequential order. If there are more sets of points than objects
in this list, they will be repeated sequentially.
The possible objects that can be used are: bullet, circle, plus, times,
asterisk, box, square,triangle, delta, wedge, nabla, diamond or lozenge
</p>
<p>Default value: bullet, circle, plus, times, asterisk, box, square,triangle, delta, wedge, nabla, diamond, lozenge
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-psfile"></a>
</p><dl>
<dt><u>Plot option:</u> <b>psfile</b><i> [psfile, <var>string</var>]</i>
<a name="IDX281"></a>
</dt>
<dd><p>Saves the plot into a Postscript file with name equal to <var>string</var>,
rather than showing it in the screen. By default, the file will be
created in the directory defined by the variable <var>maxima_tempdir</var>;
the value of that variable can be changed to save the file in a
different directory.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-run_005fviewer"></a>
</p><dl>
<dt><u>Plot option:</u> <b>run_viewer</b><i> [run_viewer, <var>symbol</var>]</i>
<a name="IDX282"></a>
</dt>
<dd><p>Controls whether or not the appropriate viewer for the plot format
should be run.
</p>
<p>Default value: <code>true</code>
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-style"></a>
</p><dl>
<dt><u>Plot option:</u> <b>style</b><i> [style, <var>type_1</var>, ..., <var>type1_n</var>]</i>
<a name="IDX283"></a>
</dt>
<dt><u>Plot option:</u> <b>style</b><i> [style, [<var>style_1</var>], ..., [<var>style_n</var>]]</i>
<a name="IDX284"></a>
</dt>
<dd><p>The styles that will be used for the various functions or sets of data
in a 2d plot. The word <var>style</var> must be followed by one or more
styles. If there are more functions and data sets than the styles
given, the styles will be repeated. Each style can be either
<var>lines</var> for line segments, <var>points</var> for isolated points,
<var>linespoints</var> for segments and points, or <var>dots</var> for small
isolated dots. Gnuplot accepts also an <var>impulses</var> style.
</p>
<p>Each of the styles can be enclosed inside a list with some aditional
parameters. <var>lines</var> accepts one or two numbers: the width of the
line and an integer that identifies a color. The default color codes
are: 1: blue, 2: red, 3: magenta, 4: orange, 5: brown, 6: lime and 7:
aqua. If you use Gnuplot with a terminal different than X11,
those colors might be different; for example, if you use the option
[<var>gnuplot_term</var>,<var>ps</var>], color index 4 will correspond to black,
instead of orange.
</p>
<p><var>points</var> accepts one two or three parameters; the first parameter
is the radius of the points, the second parameter is an integer that
selects the color, using the same code used for <var>lines</var> and the
third parameter is currently used only by Gnuplot and it corresponds
to several objects instead of points. The default types of
objects are: 1: filled circles, 2: open circles, 3: plus signs, 4: x,
5: *, 6: filled squares, 7: open squares, 8: filled triangles, 9: open
triangles, 10: filled inverted triangles, 11: open inverted triangles,
12: filled lozenges and 13: open lozenges.
</p>
<p><var>linesdots</var> accepts up to four parameters: line width, points
radius, color and type of object to replace the points.
</p>
<p>Default value: <var>lines</var> (will plot all sets of points joined with
lines of thickness 1 and the first color given by the option <code>color</code>).
</p>
<p>See also <code>color</code> and <code>point_type</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-t"></a>
</p><dl>
<dt><u>Plot option:</u> <b>t</b><i> [t, <var>min</var>, <var>max</var>]</i>
<a name="IDX285"></a>
</dt>
<dd><p>Default range for parametric plots.
</p>
<p>Default value: -3, 3
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-transform_005fxy"></a>
</p><dl>
<dt><u>Plot option:</u> <b>transform_xy</b><i> [transform_xy, <var>symbol</var>]</i>
<a name="IDX286"></a>
</dt>
<dd><p>Where <var>symbol</var> is either <code>false</code> or the result obtained by
using the function <code>transform_xy</code>. If different from <code>false</code>,
it will be used to transform the 3 coordinates in plot3d.
</p>
<p>Default value: <code>false</code>
</p>
<p>See <code>make_transform</code>, <code>polar_to_xy</code> and
<code>spherical_to_xyz</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-x"></a>
</p><dl>
<dt><u>Plot option:</u> <b>x</b><i> [x, <var>min</var>, <var>max</var>]</i>
<a name="IDX287"></a>
</dt>
<dd><p>When used as the first option in a 2d-plotting command (or any of the
first two in plot3d), it indicates that the first independent variable
is x and it sets its range. It can also be used again after the first
option (or after the second option in plot3d) to define the effective
horizontal domain that will be shown in the plot.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-xlabel"></a>
</p><dl>
<dt><u>Plot option:</u> <b>xlabel</b><i> [xlabel, <var>string</var>]</i>
<a name="IDX288"></a>
</dt>
<dd><p>Specifies the <var>string</var> that will label the first axis; if this
option is not used, that label will be the name of the independent
variable, when plotting functions with plot2d or implicit_plot, or the
name of the first variable, when plotting surfaces with plot3d or
contours with contour_plot, or the first expression in the case of a
parametric plot. It can not be used with <var>set_plot_option</var>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-y"></a>
</p><dl>
<dt><u>Plot option:</u> <b>y</b><i> [y, <var>min</var>, <var>max</var>]</i>
<a name="IDX289"></a>
</dt>
<dd><p>When used as one of the first two options in plot3d, it indicates that
one of the independent variables is y and it sets its range. Otherwise,
It defines the effective domain of the second variable that will be
shown in the plot.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-ylabel"></a>
</p><dl>
<dt><u>Plot option:</u> <b>ylabel</b><i> [ylabel, <var>string</var>]</i>
<a name="IDX290"></a>
</dt>
<dd><p>Specifies the <var>string</var> that will label the second axis; if this
option is not used, that label will be "y", when plotting functions
with plot2d or implicit_plot, or the name of the second variable, when
plotting surfaces with plot3d or contours with contour_plot, or the
second expression in the case of a parametric plot. It can not be used
with <var>set_plot_option</var>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-z"></a>
</p><dl>
<dt><u>Plot option:</u> <b>z</b><i> [z, <var>min</var>, <var>max</var>]</i>
<a name="IDX291"></a>
</dt>
<dd><p>Used in plot3d to set the effective range of values of z that will be
shown in the plot.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-zlabel"></a>
</p><dl>
<dt><u>Plot option:</u> <b>zlabel</b><i> [zlabel, <var>string</var>]</i>
<a name="IDX292"></a>
</dt>
<dd><p>Specifies the <var>string</var> that will label the third axis, when using
plot3d. If this option is not used, that label will be "z", when
plotting surfaces, or the third expression in the case of a parametric
plot. It can not be used with <var>set_plot_option</var> and it will be
ignored by plot2d and implicit_plot.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-Gnuplot-Options"></a>
</p><hr size="6">
<a name="Gnuplot-Options"></a>
<a name="SEC36"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC35" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC37" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 8.5 Gnuplot Options </h2>
<p>There are several plot options specific to gnuplot. All of them consist
of a keyword (the name of the option), followed by a string that should
be a valid gnuplot command, to be passed directly to gnuplot. In most
cases, there exist a corresponding plotting option that will produce a
similar result and whose use is more recommended than the gnuplot
specific option.
</p>
<p><a name="Item_003a-gnuplot_005fterm"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_term</b>
<a name="IDX293"></a>
</dt>
<dd><p>Sets the output terminal type for gnuplot.
</p><ul>
<li>
<strong>default</strong> (default value)
<p>Gnuplot output is displayed in a separate graphical window.
</p>
</li><li>
<strong>dumb</strong>
<p>Gnuplot output is displayed in the Maxima console by an "ASCII art" approximation to graphics.
</p>
</li><li>
<strong>ps</strong>
<p>Gnuplot generates commands in the PostScript page description language.
If the option <code>gnuplot_out_file</code> is set to <var>filename</var>, gnuplot
writes the PostScript commands to <var>filename</var>. Otherwise, it is
saved as <code>maxplot.ps</code> file.
</p>
</li><li>
any other valid gnuplot term specification
<p>Gnuplot can generate output in many other graphical formats such
as png, jpeg, svg etc. To create plot in all these formats the
<code>gnuplot_term</code> can be set to any supported gnuplot term name (symbol)
or even full gnuplot term specification with any valid options (string).
For example <code>[gnuplot_term,png]</code> creates output in PNG (Portable
Network Graphics) format while <code>[gnuplot_term,"png size 1000,1000"]</code>
creates PNG of 1000x1000 pixels size.
If the option <code>gnuplot_out_file</code> is set to <var>filename</var>, gnuplot
writes the output to <var>filename</var>. Otherwise, it is saved as
<code>maxplot.<var>term</var></code> file, where <var>term</var> is gnuplot
terminal name.
</p></li></ul>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fout_005ffile"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_out_file</b>
<a name="IDX294"></a>
</dt>
<dd><p>When used in conjunction with the <code>gnuplot_term</code> option, it can be
used to save the plot in a file, in one of the graphic formats supported
by Gnuplot. If you want to create a Postscript file, you can use the
option <code>psfile</code> instead, which will also work in Openmath, and does
the same thing with just one option.
</p>
<pre class="example">[gnuplot_term, png], [gnuplot_out_file, "graph3.png"]
</pre>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fpm3d"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_pm3d</b>
<a name="IDX295"></a>
</dt>
<dd><p>With a value of <code>false</code>, it can be used to prevent the usage of
PM3D mode, which is enabled by default.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fpreamble"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_preamble</b>
<a name="IDX296"></a>
</dt>
<dd><p>Inserts gnuplot commands before the plot is drawn. Any valid gnuplot
commands may be used. Multiple commands should be separated with a
semi-colon. The example shown produces a log scale plot. The default
value for <code>gnuplot_preamble</code> is the empty string <code>""</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fcurve_005ftitles"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_curve_titles</b>
<a name="IDX297"></a>
</dt>
<dd><p>This is an old option that has been replaced by <em>legend</em> described
above.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fcurve_005fstyles"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_curve_styles</b>
<a name="IDX298"></a>
</dt>
<dd><p>This is an obsolete option that has been replaced by <em>style</em>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fdefault_005fterm_005fcommand"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_default_term_command</b>
<a name="IDX299"></a>
</dt>
<dd><p>The gnuplot command to set the terminal type for the default
terminal. The default value is <code>set term pop</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fdumb_005fterm_005fcommand"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_dumb_term_command</b>
<a name="IDX300"></a>
</dt>
<dd><p>The gnuplot command to set the terminal type for the dumb terminal. The
default value is <code>"set term dumb 79 22"</code>, which makes the text
output 79 characters by 22 characters.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fps_005fterm_005fcommand"></a>
</p><dl>
<dt><u>Plot option:</u> <b>gnuplot_ps_term_command</b>
<a name="IDX301"></a>
</dt>
<dd><p>The gnuplot command to set the terminal type for the PostScript
terminal. The default value is <code>"set size 1.5, 1.5;set term
postscript eps enhanced color solid 24"</code>, which sets the size to 1.5
times gnuplot's default, and the font size to 24, among other
things. See the gnuplot documentation for <code>set term postscript</code> for
more information.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-Gnuplot_005fpipes-Format-Functions"></a>
</p><hr size="6">
<a name="Gnuplot_005fpipes-Format-Functions"></a>
<a name="SEC37"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC36" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 8.6 Gnuplot_pipes Format Functions </h2>
<p><a name="Item_003a-gnuplot_005fstart"></a>
</p><dl>
<dt><u>Function:</u> <b>gnuplot_start</b><i> ()</i>
<a name="IDX302"></a>
</dt>
<dd><p>Opens the pipe to gnuplot used for plotting with the
<code>gnuplot_pipes</code> format. Is not necessary to manually open the
pipe before plotting.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005fclose"></a>
</p><dl>
<dt><u>Function:</u> <b>gnuplot_close</b><i> ()</i>
<a name="IDX303"></a>
</dt>
<dd><p>Closes the pipe to gnuplot which is used with the <code>gnuplot_pipes</code>
format.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005frestart"></a>
</p><dl>
<dt><u>Function:</u> <b>gnuplot_restart</b><i> ()</i>
<a name="IDX304"></a>
</dt>
<dd><p>Closes the pipe to gnuplot which is used with the <code>gnuplot_pipes</code>
format and opens a new pipe.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005freplot"></a>
</p><dl>
<dt><u>Function:</u> <b>gnuplot_replot</b><i> ()</i>
<a name="IDX305"></a>
</dt>
<dt><u>Function:</u> <b>gnuplot_replot</b><i> (<var>s</var>)</i>
<a name="IDX306"></a>
</dt>
<dd><p>Updates the gnuplot window. If <code>gnuplot_replot</code> is called with a
gnuplot command in a string <var>s</var>, then <code>s</code> is sent to gnuplot
before reploting the window.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-gnuplot_005freset"></a>
</p><dl>
<dt><u>Function:</u> <b>gnuplot_reset</b><i> ()</i>
<a name="IDX307"></a>
</dt>
<dd><p>Resets the state of gnuplot used with the <code>gnuplot_pipes</code>
format. To update the gnuplot window call <code>gnuplot_replot</code> after
<code>gnuplot_reset</code>.
</p>
<div class=categorybox>
<p>Categories: <a href="maxima_95.html#Category_003a-Plotting">Plotting</a>
</p>
</div>
</dd></dl>
<p><a name="Item_003a-Input-and-Output"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima_9.html#SEC38" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_79.html#SEC331" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>Robert Dodier</em> on <em>April, 24 2010</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</font>
<br>
</p>
</body>
</html>
|