{"id":263,"date":"2011-08-09T06:36:40","date_gmt":"2011-08-09T06:36:40","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=263"},"modified":"2015-09-07T14:33:47","modified_gmt":"2015-09-07T14:33:47","slug":"program-of-the-month-sfgraph","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2011\/08\/09\/program-of-the-month-sfgraph\/","title":{"rendered":"Program of the month: sfgraph"},"content":{"rendered":"<p><a href=\"\/RSF\/sfgraph.html\">sfgraph<\/a> belongs to the family of plotting programs and is used for plotting explicitly defined 2-D curves. <\/p>\n<p>Here are 10 basic facts about this program: <\/p>\n<ol>\n<li><strong>sfgraph<\/strong> shares most of its parameters with some other 2-D plotting programs (<strong>sfgrey<\/strong>, <strong>sfcontour<\/strong>, <strong>sfwiggle<\/strong>). These common parameters can be accessed by running <strong>sfdoc stdplot<\/strong>. The following plot from <a href=\"\/RSF\/book\/rsf\/rsf\/sfgraph.html\">rsf\/rsf\/sfgraph<\/a> is using parameters <strong>grid=y gridcol=5 pad=n<\/strong> and some <a href=\"\/blog\/2007\/10\/27\/how-do-i-change-fonts-in-vplot-graphics\/\">creative changes of fonts<\/a> in the title. <img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfgraph\/Fig\/t10.png\" alt=\"\" title=\"\" \/><\/li>\n<li>If the input to <strong>sfgraph<\/strong> is real, it is understood as representing a regularly sampled 1-D function Y(X), where X is sampled according to <strong>n1=<\/strong>, <strong>o1=<\/strong>, and <strong>d1=<\/strong> parameters in the input file.<\/li>\n<li>If the input is complex, its real part is taken as X, and the imaginary part is taken as Y. If the input is real initially, it is easy to turn it into complex by using <a href=\"\/RSF\/sfcmplx.html\">sfcmplx<\/a> or <a href=\"\/RSF\/sfdd.html\">sfdd<\/a>.<\/li>\n<li>If the <strong>n2<\/strong> parameter in the input is greater than 1, multiple curves are plotted. The following plot from <a href=\"\/RSF\/book\/rsf\/rsf\/sfmath.html\">rsf\/rsf\/sfmath<\/a> shows plots of closed curves defined by a complex-valued input. <img decoding=\"async\" src=\"\/RSF\/book\/rsf\/rsf\/sfmath\/Fig\/rose.png\" alt=\"\" title=\"\" \/><\/li>\n<li>If the <strong>n3<\/strong> or any of the larger dimensions is greater than 1, the plot becomes a movie.<\/li>\n<li>By default, the graphs are plotted with lines. One can control the line appearance with generic parameters <strong>dash=<\/strong>, <strong>plotcol=<\/strong>, <strong>plotfat=<\/strong>.<br \/>\nThe following plot from <a href=\"\/RSF\/book\/jsg\/seislet\/sin2.html\">jsg\/seislet\/sin2<\/a> contained dashed lines created with <strong>dash=1,2,0<\/strong>. <img decoding=\"async\" src=\"\/RSF\/book\/jsg\/seislet\/sin2\/Fig\/tlog.png\" alt=\"\" title=\"\" \/><\/li>\n<li>If <strong>symbol=<\/strong> is specified, the graph is plotted with the given symbols. The size of the symbol is controlled with <strong>symbolsz=<\/strong>. The following plot from <a href=\"\/RSF\/book\/sep\/precon\/oned.html\">sep\/precon\/oned<\/a> is created with <strong>symbol=&#8221;md&#8221; symbolsz=7<\/strong>. <img decoding=\"async\" src=\"\/RSF\/book\/sep\/precon\/oned\/Fig\/schwab1.png\" alt=\"\" title=\"\" \/><\/li>\n<li>The displayed function can be changed from $Y(X)$ to $X(Y)$ by using <strong>transp=<\/strong> parameter. The following plot from <a href=\"\/RSF\/book\/jsg\/nmo3\/azimuthtest.html\">jsg\/nmo3\/azimuthtest<\/a> is created with <strong>transp=y yreverse=y symbol=+ symbolsz=4<\/strong>. <img decoding=\"async\" src=\"\/RSF\/book\/jsg\/nmo3\/azimuthtest\/Fig\/Wxinv.png\" alt=\"\" title=\"\" \/><\/li>\n<li>The ranges of $X$ and $Y$ are selected automatically but can be controlled with <strong>min1=<\/strong>, <strong>max1=<\/strong>, <strong>min2=<\/strong>, <strong>max2=<\/strong>.<br \/>\nIf you want automatic ranges, but no padding around minimum and maximum values, use <strong>pad=n<\/strong>.<\/li>\n<li><strong>sfgraph<\/strong> avoids plotting infinite or NaN (not a number) values.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>sfgraph belongs to the family of plotting programs and is used for plotting explicitly defined 2-D curves. Here are 10 basic facts about this program: sfgraph shares most of its parameters with some other 2-D plotting programs (sfgrey, sfcontour, sfwiggle). These common parameters can be accessed by running sfdoc stdplot. The following plot from rsf\/rsf\/sfgraph [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","activitypub_content_warning":"","activitypub_content_visibility":"local","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-263","post","type-post","status-publish","format-standard","hentry","category-programs"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=263"}],"version-history":[{"count":3,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":22415,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/263\/revisions\/22415"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}