{"action":"created","issue":{"url":"https://api.github.com/repos/pabristow/svg_plot/issues/5","repository_url":"https://api.github.com/repos/pabristow/svg_plot","labels_url":"https://api.github.com/repos/pabristow/svg_plot/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/pabristow/svg_plot/issues/5/comments","events_url":"https://api.github.com/repos/pabristow/svg_plot/issues/5/events","html_url":"https://github.com/pabristow/svg_plot/issues/5","id":347258457,"node_id":"MDU6SXNzdWUzNDcyNTg0NTc=","number":5,"title":"Some markers are not sensitive to the size setting.","user":{"login":"zhongjingjogy","id":9261231,"node_id":"MDQ6VXNlcjkyNjEyMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/9261231?v=4","gravatar_id":"","url":"https://api.github.com/users/zhongjingjogy","html_url":"https://github.com/zhongjingjogy","followers_url":"https://api.github.com/users/zhongjingjogy/followers","following_url":"https://api.github.com/users/zhongjingjogy/following{/other_user}","gists_url":"https://api.github.com/users/zhongjingjogy/gists{/gist_id}","starred_url":"https://api.github.com/users/zhongjingjogy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhongjingjogy/subscriptions","organizations_url":"https://api.github.com/users/zhongjingjogy/orgs","repos_url":"https://api.github.com/users/zhongjingjogy/repos","events_url":"https://api.github.com/users/zhongjingjogy/events{/privacy}","received_events_url":"https://api.github.com/users/zhongjingjogy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-03T04:51:25Z","updated_at":"2018-08-03T09:35:08Z","closed_at":null,"author_association":"NONE","body":"I have tried to scale the marker, but it seems that some markers are not sensitive to the size setting. In the figure, all the scatter lines have been plotted with following setting. Unfortunately, the asterisk and upper-triangle are not able to the scaled.\r\n\r\n```\r\nmy_plot.plot(expdata, std::string(\"exp-\") + std::to_string(i)).shape(shapes[i]).stroke_color(svg_colors[i]).size(20.0);\r\n```\r\n\r\n![image](https://user-images.githubusercontent.com/9261231/43624675-8a66ee88-971b-11e8-9270-28884cc2830d.png)"},"comment":{"url":"https://api.github.com/repos/pabristow/svg_plot/issues/comments/410200838","html_url":"https://github.com/pabristow/svg_plot/issues/5#issuecomment-410200838","issue_url":"https://api.github.com/repos/pabristow/svg_plot/issues/5","id":410200838,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDIwMDgzOA==","user":{"login":"zhongjingjogy","id":9261231,"node_id":"MDQ6VXNlcjkyNjEyMzE=","avatar_url":"https://avatars0.githubusercontent.com/u/9261231?v=4","gravatar_id":"","url":"https://api.github.com/users/zhongjingjogy","html_url":"https://github.com/zhongjingjogy","followers_url":"https://api.github.com/users/zhongjingjogy/followers","following_url":"https://api.github.com/users/zhongjingjogy/following{/other_user}","gists_url":"https://api.github.com/users/zhongjingjogy/gists{/gist_id}","starred_url":"https://api.github.com/users/zhongjingjogy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhongjingjogy/subscriptions","organizations_url":"https://api.github.com/users/zhongjingjogy/orgs","repos_url":"https://api.github.com/users/zhongjingjogy/repos","events_url":"https://api.github.com/users/zhongjingjogy/events{/privacy}","received_events_url":"https://api.github.com/users/zhongjingjogy/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T09:35:08Z","updated_at":"2018-08-03T09:35:08Z","author_association":"NONE","body":"Great!\r\n\r\nI am working on markers with Positive Polygon. I invent some utilities which can draw, triangle, square,  pentagon and hexagon. Such markers can also be rotated to some degree.\r\n\r\nThis is interesting! If you are interested in this implementation, I would like to share it with you.\r\n\r\n```\r\nstruct HackedPoint {\r\n\tdouble cx, cy;\r\n};\r\n\r\nHackedPoint custom_rotate_point(HackedPoint &origin, HackedPoint &point, double theta) {\r\n\r\n\tHackedPoint apoint;\r\n\tapoint.cx = cos(theta)*(point.cx-origin.cx) - sin(theta)*(point.cy-origin.cy) + origin.cx;\r\n\r\n\tapoint.cy = sin(theta)*(point.cx-origin.cx) + cos(theta)*(point.cy-origin.cy) + origin.cy;\r\n\r\n\treturn apoint;\r\n}\r\n\r\nvoid DrawPositivePolygon(int nedge, double size, boost::svg::g_element& g_ptr, double x, double y, bool rotated) {\r\n  double r = size;\r\n  int n = nedge;\r\n  HackedPoint origin;\r\n  origin.cx = 0.0;\r\n  origin.cy = 0.0;\r\n  HackedPoint point;\r\n  point.cx = 0.0;\r\n  point.cy = r;\r\n  double theta0 = rotated ? 3.1415*2.0/double(n)/2.0: 0.0;\r\n  HackedPoint oldpoint = custom_rotate_point(origin, point, theta0);\r\n  point = oldpoint;\r\n  for(int j = 1; j <= n+1; j++) {\r\n    HackedPoint apoint = custom_rotate_point(origin, point, 3.140*2.0/double(n)*double(j));\r\n    g_ptr.line(x + oldpoint.cx, y + oldpoint.cy, x + apoint.cx, y + apoint.cy);\r\n    oldpoint = apoint;\r\n  }\r\n}\r\n```\r\n "}}
{"actor":{"display_login":"zhongjingjogy"}}