Hot answers tagged

4

Try this vec[t_, x_, y_, z_] := {x t, y t, z t} x0[n_] := RandomReal[{-10, 10}] y0[n_] := RandomReal[{-10, 10}] z0[n_] := RandomReal[{-10, 10}] vectors[t_] := Table[vec[t, x0[n], y0[n], z0[n]], {n, 1, 10}]; styles = Table[{Hue[0.1*n], Thickness[0.005]}, {n, 1, 10}]; randVectors = ParametricPlot3D[Evaluate@vectors[t], {t, -30, 30}, PlotStyle ->...


4

Ok, I've found the solution: Just use BaseStyle -> Thick, instead of PlotStyle -> Thick.


3

You can achieve this using the option ColorFunctionof ListPlot3D. We first create test some data, then define the color function and finally make the plot: dat = Flatten[ Table[{x, y, Sin[x y], Sin[x ]^2 Sin[y ]^2}, {x, 0, Pi, Pi/20}, {y, 0, Pi, Pi/20}], 1]; col = Interpolation[dat[[All, {1, 2, 4}]]]; colfunction := Function[{x, y, z}, RGBColor[col[...


2

New Edit Maybe use With Manipulate[With[{data = RandomReal[{0, 1}, {2, 2}]}, Dynamic@Show[ArrayPlot[data^p], Graphics[Circle[]]]], {p, 0.1, 10}, SynchronousUpdating -> False] Edit Manipulate[data = RandomReal[{0, 1}, {2, 2}]; Dynamic@Show[ArrayPlot[data^p], Graphics[Circle[]]], {p, 0.1, 10}, SynchronousUpdating -> False] Original Manipulate[...


1

To simplify the generation of vectors $Version (* "12.2.0 for Mac OS X x86 (64-bit) (December 12, 2020)" *) Clear["Global`*"] vec[t_, x_, y_, z_] := {x t, y t, z t} SeedRandom[1234]; xyz = RandomReal[{-10, 10}, {10, 3}]; randVectors = ParametricPlot3D[ Evaluate[vec[t, ##] & @@@ xyz], {t, -30, 30}, PlotStyle -> Thick]; ...


1

kglr's solution is what I would have done in old Mathematica. Nowadays, I would use Riffle[]: With[{n = 5}, Graphics[Riffle[Flatten[{Circle[{0, 0}, 2 #1 - 1], Circle[{0, 0}, 2 #1]} & /@ Range[n]], {Blue, Red}, {1, -2, 2}], Axes -> True]]


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