{"id":1264,"date":"2009-05-15T12:40:58","date_gmt":"2009-05-15T11:40:58","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=1264"},"modified":"2009-05-15T12:40:58","modified_gmt":"2009-05-15T11:40:58","slug":"combining-plots-with-sage","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=1264","title":{"rendered":"Combining plots with SAGE"},"content":{"rendered":"<p><a href=\"http:\/\/www.sagemath.org\/\">SAGE math<\/a> is probably the best open-source maths package out there at the moment and slowly but surely I have been learning some of its tricks.\u00a0 Combining 2D Plots is particularly easy for example.\u00a0 Let&#8217;s plot a cosine curve in red<\/p>\n<pre>p1=plot(cos(x),x,-6,6,rgbcolor='red')\r\nshow(p1)<\/pre>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"\/images\/SAGE\/sage_cos.png\" alt=\"Cosine curve plotted with SAGE math\" \/><\/p>\n<p>Now let&#8217;s plot a sine curve in green<\/p>\n<pre>p2=plot(sin(x),x,-6,6,rgbcolor='green')\r\nshow(p2)<\/pre>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"\/images\/SAGE\/sage_sin.png\" alt=\"Sine curve plotted with SAGE math\" \/><\/p>\n<p>Combining these two plots into one single plot is extremely intuitive &#8211; just add them together<\/p>\n<pre>show(p1+p2)<\/pre>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"\/images\/SAGE\/sage_sin_cos.png\" alt=\"Combined Sine\/Cosine curves plotted with SAGE math\" \/><\/p>\n<p>You don&#8217;t get much easier than that.\u00a0  Powerful, easy to use and free &#8211; loving it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SAGE math is probably the best open-source maths package out there at the moment and slowly but surely I have been learning some of its tricks.\u00a0 Combining 2D Plots is particularly easy for example.\u00a0 Let&#8217;s plot a cosine curve in red p1=plot(cos(x),x,-6,6,rgbcolor=&#8217;red&#8217;) show(p1) Now let&#8217;s plot a sine curve in green p2=plot(sin(x),x,-6,6,rgbcolor=&#8217;green&#8217;) show(p2) Combining these [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,24],"tags":[],"class_list":["post-1264","post","type-post","status-publish","format-standard","hentry","category-math-software","category-sage-interactions"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-ko","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/1264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1264"}],"version-history":[{"count":4,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/1264\/revisions"}],"predecessor-version":[{"id":1268,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/1264\/revisions\/1268"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}