

{"id":1249,"date":"2012-06-11T10:59:24","date_gmt":"2012-06-11T15:59:24","guid":{"rendered":"http:\/\/rud.is\/b\/?p=1249"},"modified":"2017-03-27T09:40:31","modified_gmt":"2017-03-27T14:40:31","slug":"slopegraphs-in-python-formatting-tweaks","status":"publish","type":"post","link":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/","title":{"rendered":"Slopegraphs in Python \u2013 Formatting Tweaks"},"content":{"rendered":"<p>There were enough eye-catching glitches in <a href=\"https:\/\/rud.is\/b\/2012\/06\/08\/slopegraphs-in-python-experimental-raphael-support\/\">the experimental javascript support<\/a> and the ugly large-number display in the <a href=\"https:\/\/rud.is\/b\/2012\/06\/07\/slopegraphs-in-python-log-scales-spam-data-analysis\/\">spam example post<\/a> that I felt compelled to make a couple formatting tweaks in the code. I also didn&#8217;t have time to do &#8220;real&#8221; work on the codebase this weekend.<\/p>\n<p>So, along with spacing adjustments, there&#8217;s now an &#8220;<code>add_commas<\/code>&#8221; non-mandatory option that will toss commas in large numbers so they&#8217;re easy to read. Here&#8217;s an example of the new output (both the Rapha\u00ebl display and commas):<\/p>\n<style type=\"text\/css\">\n#s2 {width: 634;}\n<\/style>\n<p><center><\/p>\n<div id=\"s2\"><\/div>\n<p><\/center><br \/>\n<script>\nvar s2 = new Raphael(document.getElementById('s2'), 534, 1616);\nvar headers = new Array();\nvar lines = new Array();\nvar labels = new Array() ;\nvar values = new Array() ;\n\t\t\t\ts2.rect(0,0,534.10546875,1616.86513065).attr({fill:'#EEEEEE',stroke:'#EEEEEE'});\n\t\t\t\theaders[0] = s2.text(109, 44, 'April 2011').attr({'font':'14.0px Palatino','font-family':'Palatino','font-size':'14','font-weight':'bold','fill':'#403B33','text-anchor':'end'});\n\t\t\t\theaders[1] = s2.text(396, 44, 'March 2012').attr({'font':'14.0px Palatino','font-family':'Palatino','font-size':'14','font-weight':'bold','fill':'#403B33','text-anchor':'start'});\n\t\t\t\ts2.text(109, 1532, 'Japan').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 1532, '1,500,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 1281, 'South Korea').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 1281, '3,500,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 1260, 'Australia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 1260, '3,750,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 969, 'Germany; Italy').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 969, '10,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 941, 'United Kingdom').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 941, '11,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 869, 'Argentina; Spain').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 869, '14,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 794, 'Columbia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 794, '18,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 728, 'China').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 728, '22,500,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 413, 'Venezuela').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 413, '65,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 391, 'Indonesia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 391, '70,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 352, 'Russia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 352, '80,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 317, 'India').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 317, '90,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 285, 'Brazil').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 285, '100,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(109, 80, 'United States').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#73573F','text-anchor':'end'});\n\t\t\t\ts2.text(175, 80, '200,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':'12','fill':'#A67F5D','text-anchor':'end'});\n\t\t\t\ts2.text(331, 1586, '1,250,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 1586, 'South Korea').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 1532, '1,500,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 1532, 'Australia; Japan').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 1121, '6,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 1121, 'Columbia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 1075, '7,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 1075, 'Italy').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 1035, '8,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 1035, 'United Kingdom').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 1000, '9,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 1000, 'Spain').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 969, '10,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 969, 'Argentina; Indonesia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 903, '12,500,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 903, 'China').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 869, '14,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 869, 'Germany').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 763, '20,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 763, 'Brazil; Venezuela').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 557, '40,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 557, 'Russia').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 539, '42,500,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 539, 'India').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\ts2.text(331, 80, '200,000,000').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#A67F5D','text-anchor':'start'});\n\t\t\t\ts2.text(396, 80, 'United States').attr({'font':'12px Palatino','font-family':'Palatino','font-size':12.0,'fill':'#73573F','text-anchor':'start'});\n\t\t\t\tlines[0] = s2.path('M 184.140625 867.30842083 L 322.140625 967.210079227').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[1] = s2.path('M 184.140625 1258.42717923 L 322.140625 1530.48220703').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[2] = s2.path('M 184.140625 283.551683809 L 322.140625 761.408395419').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[3] = s2.path('M 184.140625 726.437544001 L 322.140625 900.956735234').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[4] = s2.path('M 184.140625 792.690887994 L 322.140625 1118.87883942').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[5] = s2.path('M 184.140625 967.210079227 L 322.140625 867.30842083').attr({'stroke-width':1,stroke:'#A69342'});\n\t\t\t\tlines[6] = s2.path('M 184.140625 314.834176384 L 322.140625 537.60671161').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[7] = s2.path('M 184.140625 389.45170922 L 322.140625 967.210079227').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[8] = s2.path('M 184.140625 967.210079227 L 322.140625 1073.11010464').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[9] = s2.path('M 184.140625 1530.48220703 L 322.140625 1530.48220703').attr({'stroke-width':1,stroke:'#222222'});\n\t\t\t\tlines[10] = s2.path('M 184.140625 349.805027802 L 322.140625 555.60671161').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[11] = s2.path('M 184.140625 1278.91178845 L 322.140625 1584.61513065').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[12] = s2.path('M 184.140625 867.30842083 L 322.140625 998.492571802').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[13] = s2.path('M 184.140625 938.91162251 L 322.140625 1033.46342322').attr({'stroke-width':1,stroke:'#2A464D'});\n\t\t\t\tlines[14] = s2.path('M 184.140625 77.75 L 322.140625 77.75').attr({'stroke-width':1,stroke:'#222222'});\n\t\t\t\tlines[15] = s2.path('M 184.140625 411.45503821 L 322.140625 761.408395419').attr({'stroke-width':1,stroke:'#2A464D'});\n<\/script><\/p>\n<p>As usual, it&#8217;s up on <a href=\"https:\/\/github.com\/hrbrmstr\/slopegraph\">github<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There were enough eye-catching glitches in the experimental javascript support and the ugly large-number display in the spam example post that I felt compelled to make a couple formatting tweaks in the code. I also didn&#8217;t have time to do &#8220;real&#8221; work on the codebase this weekend. So, along with spacing adjustments, there&#8217;s now an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[24,63,7,640],"tags":[751,657,658],"class_list":["post-1249","post","type-post","status-publish","format-standard","hentry","category-charts-graphs","category-development","category-programming","category-python-2","tag-slopegraph","tag-table-chart","tag-tufte"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Slopegraphs in Python \u2013 Formatting Tweaks - rud.is<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Slopegraphs in Python \u2013 Formatting Tweaks - rud.is\" \/>\n<meta property=\"og:description\" content=\"There were enough eye-catching glitches in the experimental javascript support and the ugly large-number display in the spam example post that I felt compelled to make a couple formatting tweaks in the code. I also didn&#8217;t have time to do &#8220;real&#8221; work on the codebase this weekend. So, along with spacing adjustments, there&#8217;s now an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/\" \/>\n<meta property=\"og:site_name\" content=\"rud.is\" \/>\n<meta property=\"article:published_time\" content=\"2012-06-11T15:59:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-03-27T14:40:31+00:00\" \/>\n<meta name=\"author\" content=\"hrbrmstr\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hrbrmstr\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/\"},\"author\":{\"name\":\"hrbrmstr\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"headline\":\"Slopegraphs in Python \u2013 Formatting Tweaks\",\"datePublished\":\"2012-06-11T15:59:24+00:00\",\"dateModified\":\"2017-03-27T14:40:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/\"},\"wordCount\":99,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"keywords\":[\"slopegraph\",\"table-chart\",\"tufte\"],\"articleSection\":[\"Charts &amp; Graphs\",\"Development\",\"Programming\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/\",\"name\":\"Slopegraphs in Python \u2013 Formatting Tweaks - rud.is\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\"},\"datePublished\":\"2012-06-11T15:59:24+00:00\",\"dateModified\":\"2017-03-27T14:40:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/2012\\\/06\\\/11\\\/slopegraphs-in-python-formatting-tweaks\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rud.is\\\/b\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Slopegraphs in Python \u2013 Formatting Tweaks\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#website\",\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/\",\"name\":\"rud.is\",\"description\":\"&quot;In God we trust. All others must bring data&quot;\",\"publisher\":{\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rud.is\\\/b\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/rud.is\\\/b\\\/#\\\/schema\\\/person\\\/d7cb7487ab0527447f7fda5c423ff886\",\"name\":\"hrbrmstr\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\",\"width\":460,\"height\":460,\"caption\":\"hrbrmstr\"},\"logo\":{\"@id\":\"https:\\\/\\\/i0.wp.com\\\/rud.is\\\/b\\\/wp-content\\\/uploads\\\/2023\\\/10\\\/ukr-shield.png?fit=460%2C460&ssl=1\"},\"description\":\"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7\",\"sameAs\":[\"http:\\\/\\\/rud.is\"],\"url\":\"https:\\\/\\\/rud.is\\\/b\\\/author\\\/hrbrmstr\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Slopegraphs in Python \u2013 Formatting Tweaks - rud.is","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/","og_locale":"en_US","og_type":"article","og_title":"Slopegraphs in Python \u2013 Formatting Tweaks - rud.is","og_description":"There were enough eye-catching glitches in the experimental javascript support and the ugly large-number display in the spam example post that I felt compelled to make a couple formatting tweaks in the code. I also didn&#8217;t have time to do &#8220;real&#8221; work on the codebase this weekend. So, along with spacing adjustments, there&#8217;s now an [&hellip;]","og_url":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/","og_site_name":"rud.is","article_published_time":"2012-06-11T15:59:24+00:00","article_modified_time":"2017-03-27T14:40:31+00:00","author":"hrbrmstr","twitter_card":"summary_large_image","twitter_misc":{"Written by":"hrbrmstr"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/#article","isPartOf":{"@id":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/"},"author":{"name":"hrbrmstr","@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"headline":"Slopegraphs in Python \u2013 Formatting Tweaks","datePublished":"2012-06-11T15:59:24+00:00","dateModified":"2017-03-27T14:40:31+00:00","mainEntityOfPage":{"@id":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/"},"wordCount":99,"commentCount":0,"publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"keywords":["slopegraph","table-chart","tufte"],"articleSection":["Charts &amp; Graphs","Development","Programming","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/","url":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/","name":"Slopegraphs in Python \u2013 Formatting Tweaks - rud.is","isPartOf":{"@id":"https:\/\/rud.is\/b\/#website"},"datePublished":"2012-06-11T15:59:24+00:00","dateModified":"2017-03-27T14:40:31+00:00","breadcrumb":{"@id":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rud.is\/b\/2012\/06\/11\/slopegraphs-in-python-formatting-tweaks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rud.is\/b\/"},{"@type":"ListItem","position":2,"name":"Slopegraphs in Python \u2013 Formatting Tweaks"}]},{"@type":"WebSite","@id":"https:\/\/rud.is\/b\/#website","url":"https:\/\/rud.is\/b\/","name":"rud.is","description":"&quot;In God we trust. All others must bring data&quot;","publisher":{"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rud.is\/b\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/rud.is\/b\/#\/schema\/person\/d7cb7487ab0527447f7fda5c423ff886","name":"hrbrmstr","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","url":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","contentUrl":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1","width":460,"height":460,"caption":"hrbrmstr"},"logo":{"@id":"https:\/\/i0.wp.com\/rud.is\/b\/wp-content\/uploads\/2023\/10\/ukr-shield.png?fit=460%2C460&ssl=1"},"description":"Don't look at me\u2026I do what he does \u2014 just slower. #rstats avuncular \u2022 ?Resistance Fighter \u2022 Cook \u2022 Christian \u2022 [Master] Chef des Donn\u00e9es de S\u00e9curit\u00e9 @ @rapid7","sameAs":["http:\/\/rud.is"],"url":"https:\/\/rud.is\/b\/author\/hrbrmstr\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p23idr-k9","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1261,"url":"https:\/\/rud.is\/b\/2012\/06\/12\/slopegraphs-in-python-gratuitous-raphael-animations\/","url_meta":{"origin":1249,"position":0},"title":"Slopegraphs in Python \u2013 Gratuitous Rapha\u00ebl Animations","author":"hrbrmstr","date":"2012-06-12","format":false,"excerpt":"UPDATE: It seems my use of <script async> optimization for Rapha\u00ebl busted the inline slopegraph generation. Will work on tweaking the example posts to wait for Rapha\u00ebl to load when I get some time. So, I had to alter this to start after a user interaction. It loaded fine as\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1229,"url":"https:\/\/rud.is\/b\/2012\/06\/08\/slopegraphs-in-python-experimental-raphael-support\/","url_meta":{"origin":1249,"position":1},"title":"Slopegraphs in Python \u2013 Experimental Rapha\u00ebl Support","author":"hrbrmstr","date":"2012-06-08","format":false,"excerpt":"In preparation for the upcoming 1.0 release and with the hopes of laying a foundation for more interactive slopegraphs, I threw together some rudimentary output support over lunch today for Rapha\u00ebl, which means that all you have to do is generate a new slopegraph with the \"js\" output type and\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1174,"url":"https:\/\/rud.is\/b\/2012\/06\/05\/slopegraphs-in-python-more-output-tweaks\/","url_meta":{"origin":1249,"position":2},"title":"Slopegraphs in Python \u2013 More Output Tweaks","author":"hrbrmstr","date":"2012-06-05","format":false,"excerpt":"The best way to explain this release will be to walk you through an updated configuration file: { \"label_font_family\" : \"Palatino\", \"label_font_size\" : \"9\", \"header_font_family\" : \"Palatino\", \"header_font_size\" : \"10\", \"x_margin\" : \"20\", \"y_margin\" : \"30\", \"line_width\" : \"0.5\", \"slope_length\" : \"150\", \"labels\" : [ \"1970\", \"1979\" ], \"header_color\" :\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1115,"url":"https:\/\/rud.is\/b\/2012\/05\/29\/slopegraphs-in-python-colors-fonts-alignment\/","url_meta":{"origin":1249,"position":3},"title":"Slopegraphs In Python \u2013\u00a0colors, fonts &#038; alignment","author":"hrbrmstr","date":"2012-05-29","format":false,"excerpt":"On the heels of last evening's release of Slopegraphs in Python post comes some minor tweaks: Complete alignment control of labels & and values Colors (for background, lines, labels & values) \u2014 I picked a random pattern from Adobe's Kuler A font change (to prove width calculations work) \u2026and a\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1181,"url":"https:\/\/rud.is\/b\/2012\/06\/05\/slopegraphs-in-python-slope-colors\/","url_meta":{"origin":1249,"position":4},"title":"Slopegraphs in Python \u2013 Slope Colors","author":"hrbrmstr","date":"2012-06-05","format":false,"excerpt":"As the codebase gets closer to the 1.0 stretch we now have the addition of slope colors for when values go up\/down or remain constant between points. The code still only handles two columns of data, but the intent is for each segment to also be colored appropriately (up\/down\/same) in\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1880,"url":"https:\/\/rud.is\/b\/2013\/01\/11\/slopegraphs-in-r\/","url_meta":{"origin":1249,"position":5},"title":"Slopegraphs in R","author":"hrbrmstr","date":"2013-01-11","format":false,"excerpt":"I updated the code to use ggsave and tweaked some of the font & line size values for more consistent (and pretty) output. This also means that I really need to get this up on github. If you even remotely follow this blog, you'll see that I'm kinda obsessed with\u2026","rel":"","context":"In &quot;Charts &amp; Graphs&quot;","block_context":{"text":"Charts &amp; Graphs","link":"https:\/\/rud.is\/b\/category\/charts-graphs\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/1249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/comments?post=1249"}],"version-history":[{"count":0,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/posts\/1249\/revisions"}],"wp:attachment":[{"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/media?parent=1249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/categories?post=1249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rud.is\/b\/wp-json\/wp\/v2\/tags?post=1249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}