Tag Info

Hot answers tagged

18

I'm the developer of Dataset. Yes, this is a gross documentation oversight. We planned this functionality but had to push it back to a point release. Somehow no-one caught this piece of legacy documentation. I'm filed a bug on the documentation problem right now, it's easy to fix. As for when L-value assignment will be available, I'm hoping 10.0.1 or ...


10

Regarding the plot issue, I tried using HoldForm[x = Stack[_]] as an axis label to capture the stack at the moment of evaluation inside HoldForm. This revealed a problem in a helper function for dealing with units. The function Visualization`Utilities`OptionsDump`unitFormStringQ is applied to the axis labels (in a pattern test). The definition is this: ...


9

I'm not sure what's going on with HoldForm[InputForm[ℰ]], but I think I know what's going on with Plot. It appears at some point ReleaseHold is called because wrapping HoldForm twice fixes your problem. Plot[x^2, {x, -2, 2}, AxesLabel -> {x, HoldForm[HoldForm[InputForm[E = 1]]]}]


9

The details of the styles associated with various themes can be accessed using the function ResolvePlotThemes in the Charting context. For example: Grid[{#, Column@(Charting`ResolvePlotTheme[#, ListPlot] /. HoldPattern[PlotMarkers -> _] :> Sequence[])} & /@ {"Monochrome", "Frame", "Vibrant"}, Dividers -> All] (* removed the part ...


8

A work-around: plt = Plot[Sinc[x], {x, 0, 10}, PlotStyle -> Thick, ColorFunction -> (ColorData["AvocadoColors"][#2] &), ImageSize -> 400]; legend = Row[{Graphics[plt[[1]], AspectRatio -> 1, ImageSize -> 30], "Teste"}]; Legended[plt, legend] In Version 10, one can use PlotTheme->"Sparkline" to create the thumbnail legend: ...


7

Though I don't know what is the efficiency impact of it, a workaround could be converting the Dataset to Association by Normal, making the update on the Association, then converting it back to Dataset. ds = Dataset[{<|"a" -> 1, "b" -> "x"|>, <|"a" -> 2, "b" -> "y"|>, <|"a" -> 6, "b" -> "z"|>}] ds = Module[{temp = ...


7

Using Simon Woods's Spelunk we see that the body of the function is: Self : AssociatePairs[l_] := Module[{r$}, r$ = Which[! Quiet[TrueQ[MatrixQ[l, PairQ]]], Message[AssociatePairs::npairs, l]; $FailRHS, True, HoldSequence[Associate @@ Transpose[l]]]; ReleaseHoldSequence[r$] /; ! MatchQ[r$, $FailRHS | HoldSequence[$FailRHS]] ] I draw ...


7

For file operations two workarounds currently work: 1) Use slash / instead of double backslash in the paths to files under Windows: Import["D:/test/кириллическое название/файл.txt"] 2) Use FileNameJoin or StringJoin: Import[FileNameJoin[{"D:", "test", "кириллическое название", "файл.txt"}]] Import[StringJoin[{"D:", "\\", "test", "\\", "кириллическое ...


7

I can't comment on exactly why HoldForm has changed but I believe your examples fall under the purview of the new Active/Inactive functionality. For example: Clear[x]; Plot[Sin[x], {x, 0, 1}, AxesLabel -> {Inactivate[x = 3], Inactive[Set][InputForm[E], 3]}] x Note, however that Inactivate can't be used with InputForm, since you want InputForm to ...


7

This is a bug in DSolve. The solution to your example should certainly include a constant of integration. DSolve attempts to solve this Riccati equation by solving the corresponding second order linear ODE. The problem occurs while using the solution of the second order linear ODE, which has an unevaluated integral in it. Sorry for the confusion and ...


6

I think it's a bug. Tracing Tracing the evaluation of DSolve as the following: eq = D[y[x], x] - y[x]^2 + y[x]*Sin[x] - Cos[x] == 0; traceRes = Trace[DSolve[eq, y[x], x, GeneratedParameters -> ThisIsForGeneralC], {TraceInternal -> True, TraceOff -> _Message}]; and formatting (using the ...


6

This is at least one bug, possibly more. Let me explain: If we go one step further and use Needs["TetGenLink`"] tethull = TetGenConvexHull[pts]; bmr = BoundaryMeshRegion[tethull[[1]], {Polygon[tethull[[2]]]}] BoundaryMeshRegion::binsect: "The boundary curves self-intersect or cross each other in ...


6

In Mathematica 10.0.0 for Windows, I have experienced similar problems. When non-ASCII characters were placed after \ in a string, they were decoded in a strange way. (Character '\' is used as a path separator in Windows). ToCharacterCode["\\a", "Unicode"](*OK*) {92, 97} ToCharacterCode["\\", "Unicode"](*OK*) {92} ToCharacterCode["μ", "Unicode"](*OK*) ...


5

Heureka! Symbolic solution with constant of integration found. With a little help for MMA from its friend ... Writing the differential equation as eq = y'[x] - Cos[x] == y[x] (y[x] - Sin[x]); we observe that putting (no MMA code) $$z(t)=y(t)-Sin(t)$$ we obtain a related equation eq1 = z'[t] == z[t] (z[t] + Sin[t]); which surprisingly is DSolved ...


5

This bug has been fixed in V10 mat = {{7/2 - I/2, -1 + I, 1/2 + 5 I/2}, {-1 + I, 5 + I, -1 + I}, {1/2 + 5 I/2, -1 + I, 7/2 - I/2}}; Eigensystem[mat] Gives: {{6, 3 + 3 I, 3 - 3 I}, {{1, -2, 1}, {1, 1, 1}, {-1, 0, 1}}} \begin{array}{ccc} 6 & 3+3 i & 3-3 i \\ \{1,-2,1\} & \left\{1,1,1\right\} & \{-1,0,1\} \\ \end{array}


5

I propose two possible solutions: Turn off transparency by including Opacity[1] in the CountourStyle Use CapForm["Butt"] to prevent the line caps from overlapping. With this solution you can keep transparency on, and the result will look like: With CapForm["Butt"] theoretically there can still be a slight misalignment, or crack between the lines, but ...


4

Change to delta := Module[{y}, NDSolve[{y''[n] + y'[n] - y[n] == 0, y[-3] == 1, y'[-3] == 1}, y, {n, -3, 0}]] This is a possible bug.


4

I appreciate that this is a question with philosophical and technical dimensions about automation. Like kguler a work around: Plot[Sinc[x], {x, 0, 10}, PlotStyle -> Thick, ColorFunction -> (ColorData["AvocadoColors"][#2] &), ImageSize -> 400, PlotLegends -> BarLegend["AvocadoColors", LegendMarkers -> None, LegendLabel -> ...


4

Now that the workaround has worked for me for days without crash, let me put it as an answer myself. The crash (at least in my case) is because of the kernel tries to connect to internet and something wrong happened there. To solve the problem, uncheck Preference -> Internet Conectivity -> Allow the Wolfram System to access the Internet


4

Wolfram have confirmed this is a bug


3

I can't yet explain the behavior but I can greatly reduce your minimum example: MakeBoxes[a_ /; FreeQ["foo", a], fmt_] := "bar" /; False ODE = F'[z] == g F[z]; Fguess = {F -> (Exp[a #] &)} ODE /. {F -> (Exp[a #] &)} ODE /. Fguess {F -> (Exp[a #1] &)} a E^(a z) == E^(a z) g Derivative[1][F][z] == g F[z] Critically: If I ...


3

I'm running of OS X, and if I try Style[FromCharacterCode[6, "Webdings"], 24] I get Get::noopen: "Cannot open /Applications/Mathematica.10.app/SystemFiles/CharacterEncodings/Webdings.m. >>" On the other hand Style[FromCharacterCode[Range[33, 255], "ZapfDingbats"], 24] gives So it appears that the Webdings font is not supported in V10. A hint ...


3

This bug has been fixed in v10.0 (Tested on Wolfram Programming Cloud):


3

Maybe they renamed it. You should search the help for "AutomatedReports" this will bring you to guide/AutomatedReports. Or on the web: AutomatedReports. Some small examples an more detailes are presented at Automated Report Generation and the links therein.


3

So what you basically have to do is to take the head of the arrow only. I was a bit lazy to rebuild the Polygon myself so I looked for a .m file related to Arrow and found Arrow.m in /usr/local/Wolfram/Mathematica/8.0/AddOns/LegacyPackages/Graphics which contains approximately the following function makehead: makehead[len_, wid_, cent_] := Polygon@{{0, 0}, ...


3

Looks like a bug. Stupid workaround: Export["t:\\test.pdf", ImportString@ExportString[p, "EPS"]] At the very least, there's a good chance that this would output reasonable vector graphics. Or, p = Plot[x, {x, 0, 1}, Frame -> True, FrameLabel -> {x, Sqrt[y]}] The latter is what I usually do, anyway.


3

In lieu of Set, the Query syntax offers various ways to update selective elements of a dataset. For example, we can change the value of the field a in the first row like this: ds[{1 -> (<| #, "a" -> 999|> &)}] or like this: ds[{1 -> Query[{"a" -> (999 &)}]}] Multiple fields can be updated simultaneously: ds[{1 -> ...


2

Today I reinstalled Mathematica 9 on my MacBook Air 2013 - I had the external Apple Display connected when installing - now CurrentImage[] only works when external Display is connected and works through that camera. This may be a hint for others ...


2

I don't know if this help or not but here is what I got for you. ContourPlot[Sin[x y], {x, 0, 3}, {y, 0, 3}, ContourShading -> None, ContourStyle -> {{Red, Thickness[0.008]}}, PlotTheme -> None]


2

This is also not an answer but a brief study in $Version "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" which might be of interest. It considers three methods of calculating the requested probability. It shows that in this version there is no negative probability but there is still a "critical number" which amounts to 8. For n = 8 the ...



Only top voted, non community-wiki answers of a minimum length are eligible