Hot answers tagged

13

data1 = RandomVariate[NormalDistribution[0, 1], 1000]; data2 = RandomVariate[NormalDistribution[0.3, 1], 1000]; One way is PairedHistogram PairedHistogram[data1, data2] A different layout can be achieved by hacking the height specification of Histogram. Show[ Histogram[data1, Automatic], Histogram[data2, Automatic, -#2 &] ] Update In ...


10

While I don't know the exact details on how Gravatar generates identicons, the following might give you a something suitable. Generally speaking, identicons are generated by hashing the user data and then creating a graphic based on the hash. A common technique is to cycle through and turn pixels on or off based on whether the value of a digit in the hash ...


8

Yes, use GraphEmbedding. Graph is atomic and you should not try to extract any information from it by looking at its input form. It is not reliable, can change between versions, undocumented, etc. Nor is the input form directly accessible with things like Part.


5

Well, you can use DiscretizeGraphics and RandomPoint to achieve what you want: P0 = ContourPlot3D[Φeff == E0, {x, -rm, rm}, {y, -rm, rm}, {z, -rm, rm}, Mesh -> None, Lighting -> None]; Note the Lighting -> None option, this is to circumvent a bug in DiscretizeGraphics that the good people at Wolfram refuse to fix. gg = ...


3

Clear["Global`*"]; Φcl = (-G*Mcl)/Sqrt[x^2 + y^2 + z^2 + a^2]; Φeff = Φcl + 1/2*(κ2 - 4*ω^2)*x^2 + 1/2*v2*z^2; G = 1; Mcl = 2.2; a = 0.182; κ2 = 1.8; ω = 1; v2 = 7.6; E0 = -3.2; rm = 1; P0 = ContourPlot3D[Φeff == E0, {x, -rm, rm}, {y, -rm, rm}, {z, -rm, rm}, Mesh -> None] Now extract the points from the surface pts = First@Cases[P0, ...


2

Why not directly use ListCurvePathPlot? ListCurvePathPlot@aa


2

Adding links to comment by MarcoB Note the Attributes of RegionPlot Attributes[RegionPlot] (* {HoldAll, Protected, ReadProtected} *) Since RegionPlot and other plot functions have attribute HoldAll you need to use Evaluate a = {x^2 < y^3 + 1, y^2 < x^3 + 1}; RegionPlot[Evaluate[a], {x, -2, 5}, {y, -2, 5}]


1

This turned out to be pretty simple, using ClickPane to capture the clicks, and MousePosition so that you can see the current coordinates. After running the code below, and placing your mouse over the plot, the coordinates are displayed above the plot. After clicking, the coordinates you click are added to the list pts. This bypasses any interaction with ...


1

You might try to use Locatorfor this purpose. Try this: coord = {}; DynamicModule[{pt = ImageDimensions[im]/2 // N}, Column[{ Show[{ image, Graphics[Locator[Dynamic[pt]]] }], Dynamic[pt], Button["Get coordinates", Clear[coord]; coord = pt] }] ] where ´image` is the name of your image and coord is the global variable. You ...


1

spinArrow[r_, θ_, ϕ_] := Module[{cart = CoordinateTransform["Spherical" -> "Cartesian", {r, θ, ϕ}], x, y, z}, {x, y, z} = cart; Graphics3D[{{Thickness[0.005], RGBColor[.4, .3, .2], Arrow[Tube[{{0, 0, 0}, {x, y, z}}, .005]]}, {Dashed, Line[{{x, y, 0}, {x, y, z}}], Line[{{x, 0, 0}, {x, y, 0}}], ...


1

You've created a MeshRegion, so you can plot it with RegionPlot3D, Of course, since your cylinder is rotated with respect to the cartesian coordinates, you'll need to find the right combination of coordinates to give the mesh you want. Here are some examples, RegionPlot3D[hull, Mesh -> 10, MeshFunctions -> #, Axes -> True, ImageSize -> ...



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