« first day (2635 days earlier)      last day (1846 days later) » 

2:53 AM
why can't i use PlotMarkers -> Graphics[{Blue, Thick, Circle[]}, ImageSize -> 15] in ErrorListPlot in mma 11.3.. The error bars missing whenever I use that
 
 
9 hours later…
11:56 AM
many of WRI web pages are either down or too slow to come up, this has been for many hrs now. I wonder if this is because they are making changes in them to announce version 12 !
 
I feel like I'm missing something obvious - is there a simple looping construct that will stop at the first minimum (ie, where the function stops descending)?
Consider something like f[n_]:=Abs[100-Length@FindClusters[pts, n]]. I know the best value for n is 6, but I want MMA to do it for me. I don't know how to get MMA to get the best value without saying "try every option between 0 < n < 50 and give me the smallest". I want to do something like "try the minimum number of options to give me the smallest". Perhaps a binary search or something.
I'm certain I'm just missing something, but I've tried Minimize, FindMinimum, etc and can't get them to return faster than just doing something like TakeSmallest[Table[{n, f[n]},{n,1,50}], Last]
the DiscretePlot would look like a V - afaik there is no way for there to be multiple minima.
(A binary search doesn't make sense I suppose, but I hope you get the idea)
 
 
2 hours later…
1:57 PM
Anybody have a good idea on how to sort these rectangles clockwise (or just so that they have a logical order that isn't north-south)
(or rather, whatever order it is that they currently have)
For context, these are for maps of trails I am making. Each rectangle is a page of a map, so there is a logical order for these things - the direction you would walk the trail.
{Cuboid[{53.5228, -8.32989}, {53.5876, -8.25296}],
 Cuboid[{53.5415, -8.40161}, {53.6067, -8.33012}],
 Cuboid[{53.5877, -8.31975}, {53.6257, -8.2737}],
 Cuboid[{53.6072, -8.39615}, {53.6664, -8.31595}],
 Cuboid[{53.6666, -8.42846}, {53.7325, -8.36429}],
 Cuboid[{53.6449, -8.46243}, {53.7026, -8.39456}],
 Cuboid[{53.7019, -8.50729}, {53.7659, -8.42951}]}
(Extra annoyances involve: not all trails are loops, some trails have large offshoots or are multiple large connected loops; there are 42 of these so I really don't want to order them manually every time...)
in case anybody's curious the maps look like this:
(The underlying points of the trail are not strictly ordered either, and FindShortestTour doesn't really help because there are multiple sub-loops etc)
 
 
2 hours later…
4:40 PM
The idea is to judge the distance between two pages by the distance between the points inside them, and to find the shortest tour through the graph built this way
 
5:17 PM
@LukasLang Wow, that is fantastic, thank you so much!
also A+ for extracting the points from the image ;)
 
5:31 PM
unrelated, is there a way to have MMA automatically replace [[ with the nice \[LeftDoubleBracket]?
I know <esc>[[<esc> will do it but that's more keystrokes than I would like :P
also, holy crap, I didn't realise there was a function shorthand notation...
 
5:46 PM
@CarlLange You could add this to the ImportAutoReplacements which e.g. convert == or -> to its named-characters. However, this will only work for the [[ and not for ]] obviously because the latter is not always the closing of Part.
 
@halirutan Mmm, I suppose it doesn't make enough sense since you'd want both left and right halves. Maybe they should have a little replacement after shift-enter...
 
@CarlLange I guess it is the reason why they didn't add this in the first place. You need context information to decide if it would be OK to insert ]] which the front end doesn't have.
 
@halirutan Yeah, which is why I thought after shift-enter, since they have the AST then and would know which brackets mean which. But hey, it would just be a nice shorthand.
 
@CarlLange Yep. Since they also have indenting, highlighting and autocompletion of option-values, they clearly must use the AST at some point.
 
6:19 PM
is there an obvious way to pad a Rectangle? I can't seem to come up with one
sadly `Scale[Cuboid[{53.`, -8.`}, \
{53.5`, -8.2`}],
1.1, {Center, Center}] // Normal` doesn't seem to resolve the `Scale` :(
 
 
3 hours later…
9:02 PM
@CarlLange For [[ I use the KeyEventTranslations from this answer mathematica.stackexchange.com/a/5221/58370. Control+] inserts [LeftDoubleBracket] followed by a placeholder followed by [RightDoubleBracket] so you can just start typing the part expression.
 
9:17 PM
@CarlLange You could add your own auto-replacement rule to CellEpilog:
SetOptions[EvaluationNotebook[],
 CellEpilog :> If[
   ! TrueQ[
     Max@CurrentValue[CellChangeTimes] <= CurrentValue[EvaluationCell[], {TaggingRules, "autoreplaceTime"}]
     ],
   CurrentValue[EvaluationCell[], {TaggingRules, "autoreplaceTime"}] = Max@CurrentValue[CellChangeTimes];
   NotebookWrite[
    EvaluationCell[],
    Replace[NotebookRead[EvaluationCell[]],
     RowBox@{head_, "[", RowBox@{"[", part_, "]"}, "]"} :>
      RowBox@{head, "\[LeftDoubleBracket]", part, "\[RightDoubleBracket]"}, All]
 
9:45 PM
@CarlLange what exactly do you want to achieve with this rectangle?
@CarlLange about [[ take a look at formatter plus a way to use it
 
10:31 PM
@Kuba Export as GeoJSON or KML eventually.
Thanks a lot for all the helpful answers today everyone :)
 

« first day (2635 days earlier)      last day (1846 days later) »