Skip to main content
25 events
when toggle format what by license comment
Apr 13, 2017 at 12:56 history edited CommunityBot
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Jul 21, 2015 at 18:47 comment added Oleksandr R. @Szabolcs actually, it was even suggested by the site as a related question. Here: (56327). Although undocumented, this method does seem to work fine. I am not sure about the case with the legend, though.
Jul 21, 2015 at 18:38 comment added Oleksandr R. @Szabolcs I don't know but I have a feeling this may have been asked before in a different context. If you can find the question, please link it here. And if not, it is a good topic for a new question.
Jul 21, 2015 at 15:00 comment added Szabolcs Do we have an easy way to allow these to pick up the PlotStyle, in particular the colour, without having to double- or triple-specify it for the line, the markers and the legend?
Jul 16, 2015 at 19:35 comment added Oleksandr R. @Szabolcs thanks. I am not very good at keeping the GitHub up to date, so it is just as well you seem to be quite good at prompting me!
Jul 16, 2015 at 19:34 history edited Oleksandr R. CC BY-SA 3.0
adding GitHub link
Jul 16, 2015 at 8:43 comment added Alexey Popkov @Szabolcs I have added the option to load and install my package from GitHub (see my answer).
Jul 16, 2015 at 7:25 comment added Szabolcs @AlexeyPopkov and Oleksandr: Have you considered putting this on GitHub or other similar site? It would be easier for us to keep it up to date and it would also be easier to download the package (no copy & paste).
Jun 3, 2015 at 22:29 history edited Oleksandr R. CC BY-SA 3.0
added 5121 characters in body
Jun 3, 2015 at 21:04 comment added Oleksandr R. @AlexeyPopkov it's very nice! Thanks for the extra shape ideas. Actually, the reason I didn't update the answer yet is due to trouble with the star coordinates. They end up being extremely large irrational expressions that get even larger after centroiding and scaling, which it doesn't seem a good idea to use in graphics. So I had been thinking about how best to make a star whose vertices are "rounder" numbers.
Jun 3, 2015 at 18:14 comment added Alexey Popkov @OleksandrR. I ended up with completely reimplemented core of your package, so I decided to post it as separate answer.
Jun 1, 2015 at 11:05 comment added Oleksandr R. @AlexeyPopkov thanks! It is because after converting to outlines I used Rationalize on the result (although the font outlines also may not be perfect; I didn't check these). I thought that the error of $< 10^{-3}$ would not be significant, but you are right, it is not strictly correct. I will see if I have time later on to update the definitions. Or you are welcome to edit the post if you like. Thanks again.
Jun 1, 2015 at 7:59 comment added Alexey Popkov @OleksandrR. For "Cross": Polygon[With[{a=1/10},Join@@NestList[#.{{0,-1},{1,0}}&,{{-a,1},{a,1},{a,a}},3]]], for "DiagonalCross": Polygon[With[{a=1/10},Join@@NestList[#.{{0,-1},{1,0}}&,{{-a,1},{a,1},{a,a}}.RotationMatrix[Pi/4],3]]].
Jun 1, 2015 at 7:00 comment added Alexey Popkov @OleksandrR. For the "SixPointedStar" you could start from Polygon[Flatten[Table[{{0,1},{1/(2 Sqrt[3]),1/2}}.RotationMatrix[2n Pi/6],{n,0,5}],1]].
Jun 1, 2015 at 6:33 comment added Alexey Popkov @OleksandrR. Very clever and clear approach (+1)! But I must note that all manual definitions ("FivePointedStar", "SixPointedStar", "Cross", "DiagonalCross") are not quite correct: they are distorted a bit and/or shifted a bit from the center. For example, why the top point of the "FivePointedStar" is at x = 1/7260 instead of x = 0? For "FivePointedStar" I suggest to start from Polygon[Flatten[Table[{{0,1},{Sin[Pi/10] Tan[Pi/5],Sin[Pi/10]}}.RotationMatrix[2n Pi/5],{n,0,4}],1]].
May 31, 2015 at 18:38 history edited Oleksandr R. CC BY-SA 3.0
"UpTriangle" got lost somehow
May 31, 2015 at 18:20 comment added Oleksandr R. @J.M. in that case, I updated the post with a slightly improved version. Maybe worth noting that it is also compilable, and it achieves a fair speedup by doing so. Could be useful in case someone wants to use the countries of the world as plot markers? (But the rendering will be a slow process.)
May 31, 2015 at 18:18 history edited Oleksandr R. CC BY-SA 3.0
added 350 characters in body
May 31, 2015 at 18:00 comment added J. M.'s missing motivation Probably in the case of taking areas/centroids of countries, I guess. :) (P.S. IOU one upvote.)
May 31, 2015 at 17:54 comment added Oleksandr R. @J.M. on the other hand, my formulation evaluates in about one sixth of the time for a 1 million point polygon. Of course it's open to question whether it is sensible to consider such a polygon anyway...
May 31, 2015 at 17:40 comment added Oleksandr R. @J.M. your formulations are considerably more elegant than mine. I suppose that's what comes of knowing where these expressions come from, rather than just copying a result from Wikipedia out of sheer frustration.
May 31, 2015 at 17:35 comment added Yves Klett The only downside: now I'll have to redo quite a few figures right away.
May 31, 2015 at 17:32 comment added J. M.'s missing motivation Notes: I implemented the shoelace method for area here, and a procedure for the centroid here. Could be useful… :)
May 31, 2015 at 17:28 comment added Yves Klett Excellent! Off-center PlotMarkers have been irking me intermittently (but reliably) .
May 31, 2015 at 17:15 history answered Oleksandr R. CC BY-SA 3.0