Reputation
2,546
Top tag
Next privilege 3,000 Rep.
Cast close & reopen votes
Badges
4 31
Newest
 Nice Answer
Impact
~24k people reached

Jul
1
comment Where I can find the CD version of Stan Wagon - “Mathematica in action” 3rd ed. book?
extras.springer.com/2010/978-0-387-75366-9
Jul
1
comment EdgeForm with Graphics
Try adding the option Frame->True to your Graphics expression. You can turn off the tick marks with the additional option FrameTicks->None. You can use the options PlotRange and/or PlotRangePadding to control the spacing between the frame and the contents. BTW, EdgeForm is unrelated to what you're trying to achieve here.
Jun
27
comment How to get arrowheads scaled to be a fixed fraction of the arrows' lengths?
Thanks! After I tried your answer (and also Nasser's), I realized that the wording of my question was ambiguous. I have added a couple of sentences to my post to disambiguate it. Basically, the arrowheads need to be a fixed fraction of the length of the arrow. (If you multiply all the points in pts by, say, 0.01, you'll see the problem.)
Jun
27
comment How to get the size of a specific image in the front end?
@kglr: Marvelous. Thanks!
Jun
27
comment How to scale multiple graphics to preserve relative sizes?
Thanks. I have edited my post to specify more precisely what I'm after.
Jun
25
comment How to implement a live-searchable table view?
@Kuba: agreed. Inexplicable gaps like this one is one of the reasons that Mathematica gets its clocked cleaned (market-share-wise) by overall vastly inferior rivals (e.g. MATLAB). I wonder if the reason for such gaps is that filling them entails implementing familiar, run-of-the-mill stuff, with little room for mind-blowing, epochal innovation; they just can't work up the enthusiasm for the job. (Ironically, it's precisely the humdrum, everyday, thoroughly familiar stuff that people often miss in Mathematica... Like simple options for specifying ticks, for crying out loud...)
Jun
21
comment Locator-based abscissa ranges widget
I was wrong: I have no questions!
Jun
21
comment Locator-based abscissa ranges widget
Thanks! I'm sure I will have questions, but it will take me a little while to digest your answer...
Jun
19
comment How to implement a custom random process object?
@chuy: Sorry, I don't think you understand my point, but I don't know how to explain it any better than I have. I can only hope others can see what I mean.
Jun
19
comment How to implement a custom random process object?
@chuy: I realize that; what I'm getting at is that "proc" is a completely opaque reference; the documentation conveys no information whatsoever about how one would implement such a thing programmatically in the Wolfram language.
Jun
18
comment How to iterate over the columns of a Dataset?
Thanks! But note: ... {..., Length[data]}... is not right. With a more complete implementation of datasets, it would be Width[data], but here we may have to settle for Length[data[1]], or some such.
Jun
13
comment What's the function that takes X[Y[z___]] to Y[X[z___]]? (“swap heads”)
Thank you! I thought I once came across a remark in the docs to the effect that some built-in function could be easily used to do this head-swapping operation, and in fact it was routinely used for this... I'll wait a bit longer to see if my memory is not tricking me. But if it is, then your solution shows that it's trivial to roll one's own.
Jun
13
comment What's the function that takes X[Y[z___]] to Y[X[z___]]? (“swap heads”)
@ciao: thanks, I think that the :> is what I was missing...
Jun
13
comment What's the function that takes X[Y[z___]] to Y[X[z___]]? (“swap heads”)
@YvesKlett: I remember now: I was trying to find a solution that was agnostic about the heads in question, and every replacement-based solution I could come up with required me to hard-code the specific heads I wanted to swap. On the other hand, I can't program Mathematica patterns to save my life, so I tend to stay clear of them as much as I can...
Jun
13
comment What's the function that takes X[Y[z___]] to Y[X[z___]]? (“swap heads”)
@YvesKlett: when I tried replace-based solutions I didn't succeed... I'll try again some more.
Jun
12
comment How to specify the square-bracket analogue of MatrixForm?
@FredSimons: My apologies! I managed to drop that crucial detail in the translation. I will delete the misleading EDIT and comment shortly.
Jun
11
comment How to define a recursive pattern?
That's a neat solution. Thank you! It's not quite what I asked for, but I can use it all the same to take care of my immediate task. Unless in the next few hours someone does post the recursive pattern of the question (or confirms via a comment that, my recollection notwithstanding, such pattern is actually not possible in Mathematica), I'll accept your answer.
Jun
11
comment Lexicographic ordering of lists-of-lists?
@BlacKow: based on a quick Google search, I gather that recursion optimization in Mathematica is not at all like it is with more mainstream languages. E.g. see stackoverflow.com/q/4481301/559827
Jun
11
comment Lexicographic ordering of lists-of-lists?
...and using it to sort a list of two lists having a common prefix; the size of the stack grows linearly with the length of the shared prefix.
Jun
11
comment Lexicographic ordering of lists-of-lists?
@BlacKow: Thanks! Regarding tail recursion, I confess that I didn't give much thought to that possibility; I certainly did not take it into account when I wrote the code. In fact, I just don't understand Mathematica's evaluation model well enough to write down a function that is amenable to tail-recursion optimization (that is, not without a lot of trial-and-error). But, be that as it may, I just confirmed that no tail-recursion optimization is happening; I did this by putting a Print[Length[Stack[]]] statement inside the function, ...