{"id":9465,"date":"2014-10-13T15:14:45","date_gmt":"2014-10-13T07:14:45","guid":{"rendered":"http:\/\/www.intmath.com\/blog\/?p=9465"},"modified":"2014-11-26T10:58:27","modified_gmt":"2014-11-26T02:58:27","slug":"how-to-code-jsxgraph-axes-ticks-and-grids","status":"publish","type":"post","link":"https:\/\/www.intmath.com\/blog\/mathematics\/how-to-code-jsxgraph-axes-ticks-and-grids-9465","title":{"rendered":"How to code JSXGraph axes, ticks and grids"},"content":{"rendered":"<p>I've been creating graphs with <a href=\"http:\/\/jsxgraph.uni-bayreuth.de\/wp\/\">JSXGraph<\/a> for some time now, and I often get caught up with the problem of getting the axes to do what I want. Often you can't see the grid lines, so you have no idea of the scale of the graph, as can be seen in this screen shot.<\/p>\n<p class=\"imgCenter\"><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2014\/09\/jsxgraph-example0.png\" alt=\"How to code JSXGraph axes, ticks and grids\" width=\"355\" height=\"235\" \/><br \/>\n  No <i>y<\/i>-axis scale indication - JSXGraph plot<\/p>\n<p>Similarly, I found the business of creating grids (or are they ticks?) was quite troublesome.<\/p>\n<p>So I set about trying to get it clear in my own mind. I wrote a summary of my discoveries here:<\/p>\n<blockquote>\n<p><a href=\"https:\/\/www.intmath.com\/cg3\/jsxgraph-axes-ticks-grids.php\">JSXGraph axes, ticks and grids<\/a><\/p>\n<\/blockquote>\n<p>It's presented in several steps which increase in complexity. By the end, you'll see a graph that allows you to:<\/p>\n<ol>\n<li>See grid lines and labels all the time, no matter what zoom level is used<\/li>\n<li>See axes all the time (by &quot;docking&quot; them to the side if the graph is dragged - or zoomed - so the axes would go beyond view)<\/li>\n<li>Zoom in and out in one direction only (along the <em>x<\/em>- or <em>y<\/em>-direction)<\/li>\n<\/ol>\n<p class=\"imgCenter\"><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2014\/09\/jsxgraph-example2.png\" alt=\"How to code JSXGraph axes, ticks and grids\" width=\"355\" height=\"257\" \/><br \/>\n  Improved grids on a JSXGraph graph<\/p>\n<p>I hope those of you new to JSXGraph will find it useful. <\/p>\n<p class=\"alt\">See the <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/how-to-code-jsxgraph-axes-ticks-and-grids-9465#comments\" id=\"comms\">9 Comments<\/a> below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>  <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/how-to-code-jsxgraph-axes-ticks-and-grids-9465\"><img loading=\"lazy\" src=\"https:\/\/www.intmath.com\/blog\/wp-content\/images\/2014\/09\/jsxgraph-axes-ticks-grids.png\" alt=\"How to code JSXGraph axes, ticks and grids\" width=\"128\" height=\"100\" class=\"imgRt\" \/><\/a><br \/>\nTrying to code JSXGraph so the axes and grid lines work can be a battle. This article points to a summary with examples of how to do it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":""},"categories":[4],"tags":[134,109,127],"_links":{"self":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/9465"}],"collection":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/comments?post=9465"}],"version-history":[{"count":0,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/9465\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/media?parent=9465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/categories?post=9465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/tags?post=9465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}