2
$\begingroup$

The Wolfram Language as a ParametricPlot3D that can be used to interactively examine parametric functions in 3D. Which Python package and function(s) best replicates this?

I have several series of data that I would like to represent as categorical curves in an interactive 3D plot in a Python project.

As a minimal example on a set of 10 series with 20 observations in each, in Wolfram Language I can

SeedRandom[987]
obs = RandomVariate[StudentTDistribution[3, 1, 5], {10, 20}];
foos = PDF@*SmoothKernelDistribution /@ obs;

ParametricPlot3D[
 MapIndexed[{First@#2, u, v #1[u]} &]@foos, {u, -5, 10}, {v, 0, 1},
 BoxRatios -> {5, 1, 1},
 PlotRange -> Full,
 ColorFunction -> ColorData["SunsetColors"],
 Background -> Lighter@Purple,
 AxesStyle -> White,
 TicksStyle -> White,
 Boxed -> False,
 AxesEdge -> {{0, 0}, {1, 0}, {1, 1}},
 ViewPoint -> {3, -2, 1.5},
 ImageSize -> Large,
 Mesh -> None,
 PlotLegends -> Automatic,
 PlotPoints -> {80, 15},
 Ticks -> {{#, IntegerName@#} & /@ Range@10, Automatic, Automatic}]

enter image description here

How is this done with Python?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.