New answers tagged

4

This is an irritating bug that was introduced in V8 and has not been fixed even in the latest version (10.4.1) of Mathematica. Both f = FunctionInterpolation[N[1, 20] x, {x, 0, 1}] and g = FunctionInterpolation[N[1, 2] x, {x, 0, 1}] give a spate of error messages similar to ones you encountered. In both cases the functions returned appear to behave ...


0

It is definitely a bug. Daniel Lichtblau pointed out that it is well know since 14 years. Although I have been on board for almost this time I wasn't aware of it. So let me just make some humble remarks. It is even worse. $Version (* Out[156]= "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" *) Define f[n_, a_] := (1 + (-1)^n/n^a)^n If a>0 ...


6

Some insight can be gained by plotting Sqrt[Exp[I*t]^2 - 1] in the complex plane. Plot3D[Evaluate[ReIm[Sqrt[Exp[I*t]^2 - 1] /. t -> tr + I ti]], {tr, 0, Pi}, {ti, -1, 1}, AxesLabel -> {tr, ti, f}] Branch points occur at t == n Pi, n an integer, with branch cuts extending from the branch points to t == n Pi + I ∞. Visibly, there also are ...


2

If you don't want to import the graph into some other application, but simply save it for later use, I've found that just saving the graph in .m format preserves everything just fine: Export["graph.m", graph] This is the only approach I've found that preserves property lists, labels, everything.


3

There are two related bugs. SubstituteSingleReplace calls RulesComplement to construct a list of rules and their opposites (so in your case b_ ** a_ :> -a ** b and -b_ ** a_ :> a ** b). Unfortunately, the function incorrectly uses Rule when given a RuleDelayed (my In[1] was loading the package): In[2]:= RulesComplement[b_ ** a_ :> -a ** b] ...


11

There appears to be a bug, not in Integrate or in BesselK, but in the vertical-axis Ticks of LogLogPlot. Consider the simple case, LogLogPlot[Exp[x], {x, 10^-10, 1}, PlotRange -> All] as it should be. However, LogLogPlot[Exp[x], {x, 10^-10, 1}, WorkingPrecision -> 50, PlotRange -> All] In fact, any value of WorkingPrecision except ...


3

Use the (undocumented, afaik) options "TicksStyle" and "FrameStyle": BarLegend[{"SunsetColors", {0, 1}}, LabelStyle -> {FontSize -> 12}, "TicksStyle" -> Directive[Red, AbsoluteThickness[5]], "FrameStyle" -> Opacity[0]] In version 10, we need to add Opacity[1] in Directive[...]: BarLegend[{"SunsetColors", {0, 1}}, LabelStyle -> ...


3

Analysis (Observations in 10.1.0 under Windows.) Curiously it seems that AbsoluteThickness[0.2`] is hard-coded within the internal definitions. Formatting of BarLegend calls Charting`iBarLegend which calls Legending`LegendDump`iColorGradientLegend or Legending`LegendDump`iColorBandLegend. In the definition of iColorGradientLegend we find: ticksstyle = ...


5

There is definitely something wrong here. The alternative form of the third derivative would be to do three successive differentiations on the same object. The result in that approach is correct: D[y[t], t, t, t] // MatrixForm $$\left( \begin{array}{c} y_1{}^{(3)}(t) \\ y_2{}^{(3)}(t) \\ y_3{}^{(3)}(t) \\ y_4{}^{(3)}(t) \\ y_5{}^{(3)}(t) \\ ...


3

I tested this with V.10.4.1 running on OS X. The following both work as expected Plot[{Sin[t], Sin[2 t]}, {t, 0, 4 π}, Filling -> Axis] Plot[{Sin[t], Sin[2 t]}, {t, 0, 4 π}, PlotLabels -> Placed[{"A", "B"}, Above]] but Plot[{Sin[t], Sin[2 t]}, {t, 0, 4 π}, PlotLabels -> Placed[{"A", "B"}, Above], Filling -> Axis] fails to ...


11

This appears to be a difference in parsing between the frontend and the kernel. Compare (in a notebook) HoldForm[\[LeftCeiling]x\[RightCeiling] + 1] (* Ceiling[x] + 1 *) with Get[StringToStream["HoldForm[\[LeftCeiling]x\[RightCeiling] + 1]"]] (* Ceiling[x] (+1) *) where the latter has multiplication instead of addition. One possible workaround is ...


2

It seems to me that setenv is being used here to set the values of a series of helper variables that are then used by the other functions in the code. This (is awful but) works within a single notebook because all those variables are visible to all functions. I suspect, however, that once you put the code in a package, you run into context problems. Those ...


0

I think you stumbled upon a bug in ReliefPlot. data = Table[Sin[x] Cos[2 y] + 0.1 x, {x, -10, 10, 0.05}, {y, -10, 10, 0.05}]; ReliefPlot[data, DataRange -> {{-10, 10}, {-10, 10}}, PlotRange -> {{-5, 5}, {-8, 5}, All}, AspectRatio -> 1, Frame -> True, FrameTicks -> True ] According to the documentation for v. 10.4, PlotRange should ...


6

We can reproduce the problem in a simpler example: g = Graph[{{1}, {2}}, {{1} <-> {2}}] HighlightGraph[g, {{1}, {2}}] HighlightGraph invokes the function GraphComputation`GraphHighlightDump`vertexEdgeExtract to get the list of vertices and edges to be highlighted. For the example above, this function returns {1,2} as the list of vertices to be ...


6

This is clearly a bug, which appears when the the vertex names are lists. You should report it to Wolfram Support: http://support.wolfram.com/ I can reproduce it with version 10.4.1. Proof that lists as vertex names are reasonable: some functions return such graphs. Example: pts = RandomInteger[{1, 5}, {10, 2}]; g = NearestNeighborGraph[pts] ...


1

Disable "Show Suggestions Bar after last output" and be sure "Dynamic Updating Enabled". Now you can run the Manipulate and it works fine on Windows 10 (64 bit) and Mathematica 10.4.1. Manipulate[Plot[Erfc[x/(2 Sqrt[t])], {x, -5, 5}], {t, 0.1, 5}]


2

Bug was fixed in version 10.4.0.0.


4

TechSupport acknowledged and proposed a simple workaround by putting inert expression, e.g. empty string, inside the { }: NDSolve[{x'[t] == x[t], x[0] == 1, WhenEvent[Mod[t, 1] == 0, {""}]}, x, {t, 0, 3}]


4

Set ImagePadding option to None. (With None the exported image is cut a bit on the y-axis so use 10 instead of None) Plot[(180 Sqrt[\[Pi]^2 - 625 t] (\[Pi]^2 (-25 + 36 t) - 1500 t (-15 + 45 t -Sqrt[-\[Pi]^2 + 900 t])))/(\[Pi]^4 Sqrt[-\[Pi]^2 + 2500 t]) + Tan[2 Sqrt[\[Pi]^2 - 625 t]], {t, 0.01, 0.016}, AxesStyle -> {{Directive[Red, 12], ...


2

It seems to be a bug. I advise you to report this to Wolfram support, e.g. by using the "Give Feedback..." option on the Help menu or via their website.


4

Not a bug - it's a feature!! First let's import the data in as quick a fashion as possible, arableLandPerPopulation=<<"https://gist.githubusercontent.com/jasondbiggs/9e915145a2d4cfa34119fa4d0e535ed2/raw/75387a17c21ee7ff9d7f21e528ca2f971e24209b/gistfile1.txt"; Now look at the GeoRegionValuePlot with and without the PlotRange specified ...


8

To whom it may concern, a workaround: path = FileNameJoin[{$HomeDirectory, "Desktop", "testWorking.nb"}]; nb = Notebook[{}, Saveable -> False, NotebookEventActions -> {{"MenuCommand", "Save"} :> {}} (*the fix*) ]; Export[path, nb, "NB"]



Top 50 recent answers are included