« first day (2064 days earlier)      last day (2437 days later) » 

12:43 AM
I'm try to produce a streamplot of an electric field (the electric field potential is calculated using ndsolve then the grad of the interpolation function). A contourplot of the electric potential is correct and one of the electric field is plausible, but a vector or stream plot is returned empty. Any guesses what I'm doing wrong?
 
12:54 AM
@Young Empty plots usually indicate that the function you try to plot doesn't return numbers.
 
@halirutan Thanks ... I figured it out
 
 
1 hour later…
2:16 AM
Can someone enlighten me? Why is it not possible to use BaseStyle to set some ground-rules for plots that can always be overwritten by explicit settings?
This works
Plot[Exp[x], {x, -3, 3}, TicksStyle -> Red]
but this doesn't
Plot[Exp[x], {x, -3, 3}, BaseStyle -> {TicksStyle -> Red}]
One pointer might be this point from this Q&A:
> PlotTheme changes the fundamental style of most plots and overrides BaseStyle and GraphicsBoxOptions settings.

> Use PlotTheme -> None, individually or with SetOptions or $PlotTheme.
Although setting PlotTheme -> None doesn't help.
 
3:07 AM
@halirutan BaseStyle is for setting cell styles I think. You can handle that with GraphicsBoxOptions:
ExpressionCell[
 Plot[Exp[x], {x, -3, 3}],
 GraphicsBoxOptions -> {TicksStyle -> Red}
 ]
And if you had a cell style with that GraphicsBoxOptions set (say "RedTicks"), you could just do Plot[..., BaseStyle->"RedTicks"]
 
3:56 AM
@b3m2a1 I guess the best option is to use a wrapper like Leonid showed here.
 
4:53 AM
@Szabolcs I'm not using your MaTeX package, but I was having a look at it. Would it probably an idea to include a downvalue like this (you need to make this work for your parallel call):
Unprotect[MaTeX];
MaTeX[TextCell[str_String]] := MaTeX[str];
Protect[MaTeX];
 
0
Q: Did a moderator actually refer user Simpleton Jack to Mathematics.SE, to ask his "follow up question" about graphing panties?

amWhyA fresh new user posted the following question to mathematics.se, claiming he did so because a moderator of this site moved it there. The question was: How to graph panties? They look like sphere with three radially equi-distant holes. Has panties-like surface a specific name? If it has...

 
With this, you can get simplify and beautify the double backslash problem
2
And opening and closing such an inline-cell is just Ctrl+Shift+( and Ctrl+Shift+).
 
 
2 hours later…
6:50 AM
@b3m2a1 @halirutan BaseStyle is not for cells only but:

> An option setting BaseStyle->spec in a construct obj specifies that the construct should always automatically be displayed as Style[obj,spec].

so you have Style[Graphics[stuff], spec] but `TicksStyle` is an option for Graphics/GraphicsBox, set explicitly to `{}`.

Each time I am about to organize what I already know about styles stack, I end up being frustrated by the amount of branches and exceptions. And this example is not even so strange in this context.
 
 
1 hour later…
7:54 AM
@halirutan With MaTeX[str], str is supposed to contain LaTeX code. That's not what TextCell normally contains. With TextCell it makes more sense to convert its contents to LaTeX using TeXForm. But that already happens automatically: TeXForm@TextCell["asd"] returns \text{asd}, and MaTeX automatically calls TeXForm on (almost) anything that's not a string (including TextCell)
@halirutan Ah, I see ...
That's an interesting idea
I didn't see this second message of yours. It's definitely something to think about.
I usually do Ctrl-9 instead.
The shift is not needed maybe?
@halirutan If you want to experiment more, use MaTeX`Private`texify[TextCell[str_String, ___]] := str instead of adding definitions for MaTeX.
 
9:04 AM
Almost there with my little project!
@bobthechemist, you might be interested.
 
 
3 hours later…
11:38 AM
@J.M. Your double bonds have very nice curves!
...and yes, I am interested in the details when they are ready.
 
11:53 AM
@bobthechemist Don't let your wife hear you fancy @J.M.'s curvy double bonds
:)
 
Is there any way of extracting cells or values from a documentation page?
For example, there is a "featured example" at "example/TripPlanning" in the documentation center that contains a cell that assigns a graph to g. I'm wondering if it's possible to "import" that graph from that "example/TripPlanning" page.
I'm at a loss for keywords to search for on mma SE.
 
@bobthechemist I miss playing with actual models that much... so I went for the curves. ;)
 
I have the file path to the example page FindFile["ExamplePages/TripPlanning.nb"]
 
12:20 PM
@Szabolcs compare:
g // ClearAll
g[sym_Symbol] := ToString[sym]
Module[{inside = False},
 g[sym_] /; TrueQ@Not@inside := Block[{inside = True}
   , Block[{$ContextPath = {}, $Context = "myEmpty`"}, g[sym]]
   ]
 ]
Column@DownValues[g]
g[sym]
with
g // ClearAll
g[sym_Symbol] := ToString[sym]
Module[{inside = False}
  ,
  PrependTo[
   DownValues[g],
   HoldPattern[g[sym_] /; TrueQ@Not@inside] :> Block[{inside = True}
     , Block[{$ContextPath = {}, $Context = "myEmpty`"}, g[sym]]
     ]
   ]
  ];
Column@DownValues[g]
g[sym]
It clearly works. The problem is g[] like patterns, they are always put on top even if you manually modify DownValues.
 
 
6 hours later…
6:21 PM
Looks like final prep is at hand for 11.2 reference.wolfram.com/search/?q=what%20is%20new%20in%2011.2
The page headers are available in search but the pages are "Not Found"
 
6:35 PM
@hftf look at NotebookImport. Or import the whole Notebook and take the cell group whose first cell is a "PrimaryExamplesSection"
 
Thanks @b3m2a1. I already found some help since I posted.
 
@Kuba unless you temporarily set "ReorderDefinitions"->False" or whatever it is.
 
I'm about to blow my mind a bit…
 
@hftf what'd you find?
 
<<mynotebook returns a Notebook expression that can be pattern matched for the data I was looking for
 
6:46 PM
You can also Import it.
Same deal
Oh interesting. in NotebookImport they also provide an example of the sort of thing you were looking for:
NotebookImport[
 FileNameJoin[{$InstallationDirectory, "Documentation", "English",
   "System", "ReferencePages", "Symbols", "NDSolve.nb"}],
 "History" -> "Text"]
Though skip that FileNameJoin and use Documentation`ResolveLink instead
 
I'm code golfing so I can't waste bytes with those long function names ;P
 
e.g. like this: Documentation`ResolveLink["Solve"]
Ah. Verbose language to golf in, but good luck.
 
I can show you when I post in about an hour
I'm hoping to beat the next best candidate by 4 times
 
7:07 PM
@Edmund In the online version 11.2 is available and the docs are fully browsable.
 
@Szabolcs Thanks for the tip.
 
The online version still has plenty of limitations though. I can't do <<ExamplePages/TripPlanning.nb
Or even Import from reference.wolfram.com
 
7:24 PM
@hftf Must be an online beta release
 
I think those are intentional limitations, but it's pretty easy to make a crude workaround
Abusing the copy-to-clipboard from the online documentation, and just resolving the IP for reference.wolfram.com manually
 
8:16 PM
@Edmund See you in ~1 month?
 
I guess you can't easily map a function f over a sequence Sequence[a,b] to return Sequence[f[a],f[b]] for example
 
9:01 PM
Is the a way to extract data from this picture in mathematica? I tried TextRecognizebut I couldn't get anything sensible. imgur.com/a/GuZVP
 
@P.Fonseca Yes.. I will be there.
WTC 2017
 
9:16 PM
@psimeson what are you trying to get at? I think the picture might be too low-res. I tried some of my splitting stuff from here: mathematica.stackexchange.com/a/155451/38205 to get just some of the numbers, and it can't recognize them by themselves even with RecognitionPrior -> "Character"
 
I got that picture from the page#2 of this paper: archivesofpathology.org/doi/pdf/10.1043/…
 
@psimeson I can't access that page for some reason. I get a "The requested article is not currently available on this site.".
 
9:34 PM
@psimeson yeah even that's too low-res. The "high resolution" version of that data is 135 kb or something.
Which is almost nothing.
Is there not a proper tabular version of that output?
Like surely the authors didn't think a low-res screen grab was enough...
 
nope.. that would help a lot but for some reason they only reported that low res
 
Very odd. Actually the version in the PDF might be higher resolution somehow.
I'm gonna try screen capping that.
 
I tried cropping manually to see if I can get something sensible: imgur.com/a/vIvZ9
But, I couldn't get much using TextRecognize
 
@psimeson I'm able to get TextRecognize to output when fed the numbers...except it outputs letters.
 
how did you do it? I am trying to sharpen the image and get something out of it
 
9:43 PM
I took a screen cap of the image zoomed in, split the image into blocks, then fed it a single character and set RecognitionPrior->"Character"
 
I am new to image processing in mma so i am still trying to figure it out
 
@psimeson Lots of different ways to do things. There's a lot of high level stuff, or you can go down to the ImageData level.
 
for first column I could get only get: 29 3 183 35 10 instead of 6 29 2 34 183 35 10
 
10:04 PM
@psimeson Yeah it's odd there's no way to give TextRecognize a "Numeric" prior or something
 
yep
 
@psimeson And even when it does go to a numeric, it's not always perfectly reliable in this case. One thing that might be worth trying is a neural net trained on MNIST. I think Mathematica has one of those.
Given how bad the source data is, it's basically hand-writing.
If you binarize it.
 
I have been looking into it
 
There's a higher resolution image inside the pdf.
Not much, but 1500x1300 or so
 
how can i extract it?
 
10:21 PM
@hftf Import blanks it all out for me. How'd you get it? I ImageAssembled a screenshot that MNIST works pretty well on.
Misses 4 and 8 though
 
I just used pdfimages from the command line
 
@b3m2a1 were you able to get data using neural net
 
@psimeson still playing with it, but I'm able to get most of the data.
 
nice
 
 
10:33 PM
i followed this wolfram.com/language/11/image-and-signal-processing/… to construct neural nets... it can recognize single digits pretty well but not double digits...anyway this is the first time I am using neural nets
@hftf thanks
 
@psimeson much better is this: mnist = NetModel["LeNet Trained on MNIST Data"];
If you have 11.1
If not I'll put it in the cloud for you
Here's an example of what it can do:
You'll see there are some errors though. So the plan now is to collect all the data and identify potential errors.
By how much they differ from the standard image
(this will obviously fail for, say, 5, but with more data, more 5s should be encoded as 5 than 0)
 
I have 11.1 ... I am trying to neural nets for mnist on the fly right now
@b3m2a1 I am manually cropping image in blocks... it's ,might be really silly question .. how do i divide pictures in a block so that I can feed that into my classifier ? I am trying to use ImagePartition
 
10:50 PM
It'll split by whitespace
Just change prepImage to:
prepImg[img_?ImageQ, chopRange : {_, _} : {0, .9},
   chopTo : {_, _} : {0, 1}] :=
  ImageClip[
   ColorCombine@
    Take[ColorSeparate@img, UpTo[3]],
   chopRange, chopTo
   ];
And uses prepImage[img, {0,.75}] or so.
*use
 
I trying my own way but I have more or less guessing .. I will try your way ..thanks @b3m2a1
 
11:07 PM
@psimeson I have most of the grid. Look at this: wolframcloud.com/objects/b3m2a1/bad_paper_image_splitter.nb
I don't want to do the final corrections by hand though.
And I also have to go.
Hopefully that helps.
 
I haven't used wolfram cloud.. if you do not mind could you please share your notebook so that I can learn and improve on it
 
11:20 PM
@b3m2a1 I couldn't access the file
@b3m2a1 anyway thanks a lot ..have a good evening
 

« first day (2064 days earlier)      last day (2437 days later) »