{"action":"opened","issue":{"url":"https://api.github.com/repos/wbuchanan/brewscheme/issues/42","repository_url":"https://api.github.com/repos/wbuchanan/brewscheme","labels_url":"https://api.github.com/repos/wbuchanan/brewscheme/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/wbuchanan/brewscheme/issues/42/comments","events_url":"https://api.github.com/repos/wbuchanan/brewscheme/issues/42/events","html_url":"https://github.com/wbuchanan/brewscheme/issues/42","id":143995024,"number":42,"title":"D3js palettes not being implemented in schemes correctly","user":{"login":"wbuchanan","id":5542790,"avatar_url":"https://avatars.githubusercontent.com/u/5542790?v=3","gravatar_id":"","url":"https://api.github.com/users/wbuchanan","html_url":"https://github.com/wbuchanan","followers_url":"https://api.github.com/users/wbuchanan/followers","following_url":"https://api.github.com/users/wbuchanan/following{/other_user}","gists_url":"https://api.github.com/users/wbuchanan/gists{/gist_id}","starred_url":"https://api.github.com/users/wbuchanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wbuchanan/subscriptions","organizations_url":"https://api.github.com/users/wbuchanan/orgs","repos_url":"https://api.github.com/users/wbuchanan/repos","events_url":"https://api.github.com/users/wbuchanan/events{/privacy}","received_events_url":"https://api.github.com/users/wbuchanan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-28T14:53:02Z","updated_at":"2016-03-28T14:53:02Z","closed_at":null,"body":"```\r\nbrewscheme, scheme(d3test) allsty(category10) allc(10) \r\n\r\n// Load the auto.dta data set\r\nsysuse auto.dta, clear\r\n\r\n// Create a graph with the scheme file above\r\ntw  lowess mpg weight ||                                                    ///   \r\n    scatter mpg weight if rep78 == 1 ||                                     ///   \r\n    scatter mpg weight if rep78 == 2 ||                                     ///   \r\n    scatter mpg weight if rep78 == 3 ||                                     ///   \r\n    scatter mpg weight if rep78 == 4 ||                                     ///   \r\n    scatter mpg weight if rep78 == 5,                                       ///   \r\n    legend(order(2 \"1\"                                 ///   \r\n    3 \"2\" 4 \"3\"                   ///   \r\n    5 \"4\" 6 \"5\"))                 ///   \r\n    scheme(d3test) \r\n```\r\n\r\nGraph doesn't implement the palette colors correctly.  Lines 300 - 310 of the resulting scheme file read:\r\n\r\n```\r\ncolor p       gs6\r\ncolor p1 \"127 127 127\"\r\ncolor p2 \"140 86 75\"\r\ncolor p3 \"148 103 189\"\r\ncolor p4 \"188 189 34\"\r\ncolor p5 \"214 39 40\"\r\ncolor p6 \"227 119 194\"\r\ncolor p7 \"23 190 207\"\r\ncolor p8 \"255 127 14\"\r\ncolor p9 \"31 119 180\"\r\ncolor p10 \"44 160 44\"\r\n```\r\n\r\nThe colors are being interpreted and written to the scheme file is a bizarre order that doesn't match the ordering in the extras dataset:\r\n\r\n```\r\ncolorid      pcolor      rgb                maxcolors        seqid                  meta     \r\n1            10          31 119 180         10               category10101          D3js\r\n2            10          255 127 14         10               category10102          D3js\r\n3            10          44 160 44          10               category10103          D3js\r\n4            10          214 39 40          10               category10104          D3js\r\n5            10          148 103 189        10               category10105          D3js\r\n6            10          140 86 75          10               category10106          D3js\r\n7            10          227 119 194        10               category10107          D3js\r\n8            10          127 127 127        10               category10108          D3js\r\n9            10          188 189 34         10               category10109          D3js\r\n10           10          23 190 207         10               category101010         D3js\r\n```   \r\n"}}