« first day (26 days earlier)      last day (4475 days later) » 
01:00 - 18:0018:00 - 23:00

6:03 PM
Attempting to convert one user at a time:
0
Q: Mathematica: Different histograms with same coordinate system & same bin width specifications

JohnI am running a cluster analysis and want to plot some of my results in histograms. To compare one cluster with another I find it useful to use the same coordinate system and same bin width for each histogram. For the plot range I already got a tip: PlotRange/.Options[Histogram[DeleteCases[Flatte...

 
6:23 PM
My Piecewise bracket suddenly doesn't span multiple rows anymore. Same with the example in the documentation. Anyone an idea what might be wrong?
 
@Sjoerd, is Options[$FrontEnd, "PrivateFontOptions"] set with "OperatorSubstitution" -> False ?
 
I am trying to make a plot legend (and not use PlotLegends). What is the best format for including the legend in the plot and being able to position it either inside or outside the plot?
This is what I have now:
line[style_,
  name_] := {Graphics[{style, Line[{{0, 0}, {1, 0}}]},
   PlotRange -> {{0, 1}, .1 {-1, 1}}], name}

Plot[Sin[x], {x, 0, 10},
 Epilog ->
  Inset[Grid[{line[Red, "red"], line[Blue, "blue"],
     line[Pink, "pink"]}, ItemSize -> {{2, Full}, Automatic}],
   Scaled@{1, 1}, Scaled@{1, 1}]]
I can't position this outside the plot easily.
Maybe I can make both of them an Inset ...
 
6:40 PM
@OleksandrR yes it is.
 
@Szabolcs I've tended to take a more manual approach... make the plot and legend as separate graphics, make a new graphic, and paste them in at the appropriate locations. I'm sure there are better ways (I even bought David Park's Presentations, but hardly used it), but it works well enough for me...
@Sjoerd then that's the reason (default is True; I guess you switched it off though because of problems exporting vector graphics with Mathematica2 font embedded?). You could switch it back on just in the $FrontEndSession though I guess.
 
@OleksandrR You mean you used an external image editor?
 
@OleksandrR Thanks! Yes, it must have happened when I was looking at this question
 
@Szabolcs no, just in the front end. Apparently it's possible to do some decent drawings although I'm not sure exactly how to use most of the tools properly (check out the satellites example in ref/StateResponse... someone clearly made good use of the drawing tools).
 
I hadn't realized that I set a persistent option
 
6:47 PM
@Sjoerd yeah, I didn't realise $FrontEnd options are persistent either until I answered @Szabolcs's question that reset the configured kernels and wiped out my 32/64-bit version 7/8 kernels in the process :P
 
My splash screen is gone too. I don't recall a question with that...
 
Does anyone know how to programmatically select all cells of a given type? There's NotebookFind to find content, there's NotebookLocate to find tags, but what about finding e.g. all Code cells?
 
The Show at Startup check mark is on though
 
Or even better: all cells with a certain option (I'm interested in finding all initialization cells)
 
@OleksandrR outch!
@Szabolcs Didn't we have a question on this recently?
 
6:49 PM
I didn't see it
 
it was about opening or closing all output (input?) cells I think
 
@OleksandrR is there an easy way to reset them or some of them to default (other than say deleting init.m)? I found out just today that they're persistent and all the little annoyances I had been having all this while were due to stuff I was messing with (incorrectly!) while trying to answer questions
 
9
Q: How to Keep Input Cells Hidden After Evaluating Notebook

Tim MayesI've created a notebook for use in an in-class presentation. There is a fair amount of MMA code, and my students know nothing about MMA nor do they need to. I don't want to distract them with the code. I understand how to collapse the input cells and show only the output, but the input cells expa...

 
@yoda I don't know. I'm not really any good with the front end, notebooks, etc., so it's all a bit of a mystery to me.
 
It doesn't seem to be appropriate for your question
 
6:53 PM
@OleksandrR yeah, same here... I'm still learning to interact with the kernel and frontend separately like szabolcs does.. it has always been just the notebook for me
 
@yoda I guess you can delete init.m once, then DumpSave["FEDefaults.mx",Options[$FrontEnd]] and reload it if you mess something up. Other than that just remember to set options on $FrontEndSession rather than $FrontEnd.
 
@OleksandrR Thanks... I picked up on $FrontEndSession rather late... =) It's probably a steaming pile of crap now =)
 
@halirutan What do you think about including the FrontEnd` context in the highlighter too? Most of these symbols are actually documented, but work slightly different from the System` context equivalents (in that they can be sent to the FE directly for execution)
@halirutan I used one here
 
@Szabolcs I would make such decision depended on "how often is it really used here on SE" and maybe how many other people want it.
@Szabolcs I personally would not mind if such a symbol is not highlighted.
 
Alright, let's try to check how often it is used
 
7:02 PM
Does anyone here have a Home use licence, and/or does anyone know how to permanently get rid of the banner at the top of the notebooks?
 
@Heike What does Options[$FrontEnd, DockedCells] return for you?
@Heike if it's not empty, try SetOptions[$FrontEndSession, DockedCells -> {}]
 
I hadn't realized you getthat banner. Is it big & annoying?
 
@Heike I have no banner. Are you sure you mean "Home-use"?
 
Is it possible to have several highlighting scripts working together? I'd be a bit reluctant to put too many symbols into the standard highlighter as it's a strain on the JavaScript interpreter/regex engine but if you need to highlight other symbols occasionally perhaps an additional highlighter can be added? (BTW @halirutan, fantastic job on the current highlighting. It gets everything (syntactically) right as far as I can see.)
 
@halirutan I think she means this: wolfram.com/mathematica-home-edition
 
7:05 PM
@Szabolcs yes that's the one
 
@Szabolcs, @Heike Ok, this is not a Home-use ;-) No, I don't have such a licence.
 
At startup it's set to {DockedCells ->
FEPrivate`FrontEndResource["FEExpressions", "HomeEditionBar"]}, but setting it to {} only lasts as long as the session
 
@Heike is the home edition still 32-bit only?
 
@OleksandrR How do I check that?
 
$System?
Gives "Microsoft Windows (64-bit)" for me
 
7:07 PM
@Heike I deliberatelty asked you to set the option on $FrontEndSession in order not to break anything permanently ... did you try setting it on $FrontEnd ?
 
$System returns Mac OS X x86 (64-bit)
@Szabolcs I've tried setting the $FrontEnd but that doesn't work
 
$SystemWordLength gives either 32 or 64
 
@Heike There is a resource for the HomeEditionBar. I assume that you can replace that with another. Not sure whether we should be advocating this here...
 
@Heike What if you include it explicitly in $UserBaseDirectory/FrontEnd/init.m? (It might already be there)
 
@Szabolcs I've tried that as well, but it's set after that init.m is loaded
 
7:09 PM
@OleksandrR Thanks, but it was very often @Szabolcs who did the testing and found the bugs. To answer your question: When the script sees a CODE tag, it transfers it to the prettify-script with our language extension. After this run, this is no longer CODE-text, it is broken into many styles. A second run with another script is not possible.
 
@halirutan OK, so I guess that suggestion's a no-go. Thanks for the explanation.
 
@Heike I didn't mean Kernel/init.m (yes, it's set after that), but FrontEnd/init.m, which is managed by the front end and contains lots of settings by default. Just clarifying in case you misunderstood.
In case anyone wants to see what that bar looks like, just evaluate SetOptions[$FrontEndSession, DockedCells -> FEPrivateFrontEndResource["FEExpressions", "HomeEditionBar"]]`
 
@OleksandrR what would work in this testing phase is to make your own version by simply adding or removing keywords. This is a task of only a few minutes. Download the script, the Mathematica-Code to create the keywords is in the comments. Adjust it like you want and replace the output in the keywords variable.
 
@Szabolcs there is also "StudentBar" for the morbidly curious.
 
@Heike If nothing else works, you can search the Mathematica installation directory for the string "HomeEditionBar" (there must be some graphical grep-like utility in OS X I guess), find out what differs from the standard version, and change it
 
7:14 PM
Does someone know whether our search on M.SE is powerful enough to find "FrontEnd`"? It should take capital letters into account and find the backtick.
@Szabolcs fgrep of course ;-)
 
@Szabolcs If I edit the init.m in FrontEnd/init.m it's just replaced by the default one when I restart Mathematica
 
@halirutan I don't think we can use search to find it, but it's not very common. It's typically come up in FrontEndExecute, so we can search for that as well
 
@halirutan I think I've changed my mind... after seeing that gigantic list of keywords, if it works now, a few [hundred] more can't hurt it...
 
I think I'll just write a palette to set DockedCells->{} after start up. I don't really want to fiddle with the original files in $InstallationDirectory. It's just annoying that this banner is forced upon me.
 
@OleksandrR I think 169 are in the FrontEnd context.
 
7:20 PM
@halirutan most of these posts contain that context, but actually it doesn't bother me at all if they are not highlighted. It's up to you, judge based on the current volume of keywords. :-) It was just an idea, not a request, and I'm worried about the script not getting accepted into prettify (because it's too long) ...
@Heike One last idea, but I am worried it might break something. I can't test for you though ... SetOptions[$FrontEnd, NotebookDynamicExpression :> (*hide docked cell*)]
 
OK, I'm out. Bye all.
 
@Szabolcs I have thought about this. For me is important, that we can use our full keywords-list here. I wouldn't mind to make a reduced version for the prettify-distribution. Will the SE-people include our extra-version or will they only include what's in the official prettify-distribution?
Bye @OleksandrR
 
@Heike no, don't do that ... it'll activate the setting for each notebook you create ... sorry about giving terrible advice
 
@Szabolcs Good thing I haven't tried it yet
 
acl
@Heike hang on, let me find my note on how I removed it on my home machine and tell you
 
7:37 PM
@Heike Well, it doesn't do anything really bad, it's easy to correct it
 
acl
@Heike, open the Mathematica.app bundle (ie "Show Contents")
go to Mathematica.app/SystemFiles/FrontEnd/TextResources
open CommonFrontEndInit.tr in some editor
find SetOptions[$FrontEndSession,DockedCells->FEPrivate`FrontEndResource["FEExpressions","HomeEditionBar"]];
2
and comment it out
try not to mess up the file in some random way while doing that
 
@acl Thanks! That did the trick.
 
acl
@Heike I think I found it by searching through the config files in there for Home or something like that
 
@acl I guess I could have used grep to go through all the files.
But I've broken Mathematica before so I didn't really want to mess around.
 
acl
i thought I wouldn't bother, but after 20 min I couldn't stand that stupid thing
so I removed it in 5 or 10 more minutes.
I am not sure what they were thinking when they put it there
 
7:45 PM
@acl Just to remind us that we can't afford the €5000 premium version
 
@Heike fgrep "HomeEditionBar" $(find . -name "*.tr")
 
acl
and are too stupid to grep a set of files maybe yes
 
@Sjoerd If you feel like using your moderator powers, mathematica.stackexchange.com/q/1710/12 ;-)
 
let me see...
 
@acl you would have to know some basic unix commands for that
 
acl
7:49 PM
@Heike or google them. or use mathematica itself to go through the files, I suppose
 
@acl can you do that in mathematica without using external commands?
 
@Szabolcs A candidate for migration indeed. I couldn't find a migrate option in the box of amazing powers. Can close it though.
 
acl
@Heike I imagine you could use Filenames[] to get all files, then Import[#,"String"] them one by one and search in each
 
@Sjoerd Ah, I thought you'd be able to do migration
 
acl
(or whatever the right second arg of Import is)
 
7:52 PM
@halirutan That works better than what I was thinking of. I probably would have used grep "HomeEditionBar" -d recurse . or so
@acl I wonder how fast/slow that would be compared to (f)grep
 
acl
slow probably
 
@halirutan I noticed that the SO post of the guy who thought he could out-C++ Mathematica got deleted.
 
acl
so to check if a word appears in a 3066 byte text takes $7 10^{-6}s$ on my machine
so the bottleneck will probably be opening the files
 
@acl In Mathematica?
 
acl
yes
(the word I chose doesn't appear in the string, but that makes little difference)
I used StringFreeQ
 
7:59 PM
@acl That would be the worst case scenario.
Eeks, someone needs to learn how to format SE posts
0
Q: I want to update a financial chart when I select a new stock from a popup menu

HenrickI have the following code: // This is a comment: Read all the DOW jones financial instruments instruments = FinancialData["^DJI", "Members"] // THen I create a dynamic variable called ticker Dynamic[ticker] ticker =. // And I create a popup menu with {PopupMenu[Dynamic[ticker], instruments],...

 
acl
brilliant!
 
I need fresh coffee for this.
 
@Szabolcs It happens I can do migrations, but the option was hidden behind the close link.
Perhaps I was to quick migrating. Might the guy not have wanted to do the transformation in Mathematica?
There is a package with which you can do coordinate transformations, so...
 
How can you tell whether someone is already editing a post?
 
8:20 PM
@Heike I was just editing the FinancialData question, went in and out the edit box and then discovered Andy had been busy. No message as far as I can recall
 
@SjoerdCdeVries The same thing happened to me. I got a message that my version wasn't sufficiently different from Andy's version when I tried to commit the changes I made.
It would be nice if a post got locked while being edited.
 
acl
@Heike I suspect this has too much potential for abuse to be viable on somewhere like SO
@SjoerdCdeVries I doubt that; he says "I need to prove that" etc
 
CHM
8:59 PM
Hi. I have a quick question. If I evaluate Table[AbsoluteTiming[myFunction[i,i]][[1]],{i,100}], will the table generated consist of 100 entries, or 100*100?
Because the evaluation seems to be extremely slow...
 
100
 
CHM
Ah! NVM, it's over. 100 entries.
It took the most of 5 minutes, for a really simple function. Gneh.
@Szabolcs Thank you.
I'm comparing the efficiency of two similar functions.
 
@CHM what does your function look like?
 
CHM
there's both functions, old and new.
The new actually does more work, in less time.
Y axis = AbsoluteTiming, X = size of square matrix
 
Funny that not all points lie on the same curve
 
CHM
9:11 PM
Indeed.
 
acl
you really do have to tell us how to reproduce those curves (as in, how do I run the two makeGrids). this is intriguing
 
CHM
ok
 
acl
or actually don't, it'll just make me spend an hour on this
 
CHM
No.
Well, the evaluation for the slow function takes a couple of minutes
here
 
acl
but I will take an hour to work out why it's like this
 
CHM
9:13 PM
ta = Table[AbsoluteTiming[makeGrid[i]][[1]], {i, 0, 100}]
tb = Table[AbsoluteTiming[MakeGrid[i,i]][[1]], {i, 0, 100}]
ListPlot[{ta, tb}, PlotStyle -> {Blue, Red}, ImageSize -> Full]
@acl haha, well, no pressure.
I'm just having fun.
I find it interesting that, by simply removing loops, one goes from exponential to linear time
 
@CHM this is pretty common in Mathematica. Explicit loops are almost never the most efficient way to do things. The exception is if you are doing some funky compiling-to-C thing.
 
@CHM the two grids of the old and new function aren't the same. Is that intentional?
 
acl
@CHM in the version with loops, you are iterating Gridx*Gridy times, don't you? so it should grow like i^2
while in the other you build tables of length i
(or so it looks)
so I think that's the reason
also
Monitor[
  tb = Table[AbsoluteTiming[MakeGrid[i, i]][[1]], {i, 0, 100}],
  i
 ]
is interesting
 
CHM
@Heike yes, the second one is more convenient.
@Heike in the new function, one decides how many hexagons each side should have.
@Verbeia That's what I have been suggested, and why I have rewritten the old function.
@acl oh great, I didn't know about Monitor.
 
9:29 PM
@Heike thanks for your answer on my "FontNWidth" question. Interestingly, the value for "Times" seems all wrong.
`Manipulate[{Framed@
Graphics[
Text[Style[
DynamicWrapper["how quickly daft jumping zebras vex",
p = CurrentValue["FontNWidth"]], FontFamily -> fontfam,
FontSize -> i]], ImageSize -> Dynamic[p]*46], Dynamic[p]}, {i,
10, 40}, {fontfam, {"Verdana", "Arial", "TimesNewRoman", "Tahoma"}}]`
 
@Heike Sorry, was off for lunch. About the M-C++ post: did a answer there?
Because I cannot remember.
 
@halirutan I don't know. I don't have access to the moderator tools on DO so I can't see the deleted post
 
@Heike Me neither. I have only 2500 rep.
 
@Verbeia Wrong in what way?
The values for "FontNWidth" of the first three fonts seem very similar on my system at least, but there is a good chance that they will be different on a different OS.
 
Well, Times is a skinny font, but its reported "FontNWidth" is larger than some of the others. Thus all the whitespace in the box when Times is chosen in the little Manipulate. So I suspect that the NWidth is more about the font size than anything else. But it is really cool. I can imagine some neat layout applications with interactive resizing to make room for the font chosen.
For this reason I'm surprised your answer hasn't yet attracted many upvotes.
Would you mind if I added the Manipulate above to your answer? I think it will make the point quite nicely.
 
9:39 PM
@Verbeia I see what went wrong. I don't have TimesNewRoman on my system so it got automatically replaced with Helvetica.
@Verbeia Go ahead.
 
@Heike done, thanks!
 
@Verbeia Strange that Mike's solution doesn't work on my system.
 
gotta go - see you all later
 
bye
 
@Szabolcs, Mike Samuel wrote me (I think it's ok to quote): "Sorry I've been slow. I am planning on reviewing the mathematica
code, but have been slammed with other work. I should have some
useful comments for you early this week."
So he did not forget us, which is very kind and since we are not in a hurry until we are out of the beta, I told him, he can take his time.
 
acl
10:43 PM
here's a nice question:
2
Q: Numerical Fourier transform of a complicated function

yohbsSay I have a function $f(x)$ that is given explicitly in its functional form, and I want to find its Fourier transform[1]. If $f$ is too complicated to have an analytic expression for $\hat f(k)$, how do I obtain it numerically? The naive and stupid way, which I currently use, is evaluating the ...

why doesn't someone fix this gentleman's constants so I also can use that answer, rather than fiddling with 2Pi and the like each time I need this?
 
01:00 - 18:0018:00 - 23:00

« first day (26 days earlier)      last day (4475 days later) »