Tag Info

New answers tagged

0

Actually, that only LOOKS like the answer, but it doesn't perform the correct operation. Specifically it fails to keep the properties associated with the correct nodes in the subgraph as you can see in the following example: SomeGraph = Graph[{1 <-> 2, 2 <-> 3, 3 <-> 1}, Properties -> {1 -> {"happiness" -> 1.1}, 2 -> ...


1

The answer is actually very simple. PartOfGraph = Subgraph[SomeGraph,{1, 2},Options[SomeGraph]]; Strangely Mathematica does not list "Options[]" as an option under "Details and Options" of the Subgraph function...as one would naturally expect. I found this on the right under "Related" questions even though I couldn't find it through searching. So this ...


6

Use Evaluate[...] rather than Evaluated -> True START EDIT: Attributes[Plot] {HoldAll, Protected, ReadProtected} Since Plot has the attribute HoldAll the first expression is initially interpretted as a single entity. To make the argument a list of two distinct entities it must be evaluated to override the HoldAll attribute. Evaluated is not a ...


2

To print them one-by-one you can use Print[Labeled @@ EntityValue[#, {"Image", "Name"}]] & /@ EntityValue["PopularCurve", "Entities"]; To cycle through them you can use curves = EntityValue["PopularCurve", "Entities"]; Animate[ Labeled @@ EntityValue[curve, {"Image", "Name"}], {curve, curves}, AnimationRate -> .1 ]


5

With the arbitrary datasets datasets = {dataset1, dataset2, dataset3} = RandomReal[#, 100] & /@ {1, 2, 3}; one can pre-render the plots and add an empty plot for the case when no dataset is selected plots = Append[ MapThread[ListPlot[#1, Joined -> True, PlotStyle -> #2] &, {datasets, ColorData[97] /@ Range[3]}], ...


7

This is not a protractor, but it is a related application that that serves as an example of rotated text which is the only thing missing in the protractor shown in the question. I did it a while a go and keep it near the kitchen oven: c[f_]:=5/9 (-32+f) f[c_]:=1/5 (160+9 c) cToAngle[c_]:=(c+40)/300*(2\[Pi]-5Degree) ...


20

Graphics[{Circle[{0, 0}, 1, {0, Pi}], Circle[{0, 0}, .03], Line[{{1, 0}, {1, -.1}, {-1, -.1}, {-1, 0}}], Rotate[ Line[{{.03, 0}, {.6, 0}}] , #, {0, 0}] & /@ {0, Pi/2, Pi}, GeometricTransformation[ Piecewise[{ {{Red, Line[{{.8, 0}, {1, 0}}], Black, Line[{{.2, 0}, {.5, 0}}], Rotate[{Red, Text[#, {.75, 0}, {0, ...


2

I finally got around to fixing the routine in the math.SE answer the OP linked to. To make this answer self-contained, I'll reproduce the definitions here: GaussianCurvature[f_, {u_, v_}] := Simplify[(Det[{D[f, {u, 2}], D[f, u], D[f, v]}] Det[{D[f, {v, 2}], D[f, u], D[f, v]}] - Det[{D[f, u, v], D[f, u], D[f, v]}]^2)/ ...



Top 50 recent answers are included