Questions tagged [mplot3d]

a 3D plotting toolkit which ships with the matplotlib Python plotting library.

The mplot3d toolkit adds simple 3D plotting capabilities to the plotting library.

Resources

391 questions
0
votes
1 answer

Hide Matplotlib grid color

I'd like to hide the 3d grid background color and just display gridlines and axis labels, as it's currently the default gray color like this (Not allowed to embed images since this is a new account). Thanks.
0
votes
0 answers

Matplotlib 3D: place colorbar into z-axis

I have a matplotlib 3d plot, like the one from the examples in the documentation from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import…
charelf
  • 3,103
  • 4
  • 29
  • 51
0
votes
1 answer

Adding a colorbar by the dates of points in a 3D scatter plot

I am attempting to plot earthquakes of a certain region in a 3D plot with the color as a way to show time/date of the event. The data points are accurately colored, however, when I plot the color bar it only displays 0.0 to 1.0. How do I get the…
Cody
  • 3
  • 1
0
votes
1 answer

3d z axis-log plot

In order to create a 3d plot using plot_surface and wireframe I wrote this (looking here around) from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import rc from matplotlib.ticker import MultipleLocator import…
Drudox lebowsky
  • 1,020
  • 7
  • 21
0
votes
2 answers

Plotting curves on 3d plot with common x-axis

I would like to plot two curves in 3d such that the x-axis is shared for two curves. One curve must lie on the X-Z plane while the second curve must be on the X-Y plane. I have tried to accomplish the same using with the following code. import numpy…
0
votes
1 answer

Adding legends to Axes3D plot

I'm trying to add a legend to a 3D plot import matplotlib.pyplot as plt import matplotlib.lines as lines from mpl_toolkits.mplot3d import Axes3D plt.rcParams["figure.figsize"] = (12, 10) fig = plt.figure(1) plt.clf() ax = Axes3D(fig, …
Sam M
  • 53
  • 1
  • 2
  • 7
0
votes
0 answers

""TypeError: 'Axes3D' object is not subscriptable"" for 3d animation from data

I am trying to do a 3D animation using data from two arrays. So I paint 2040 triangles in the 3d plain and I don't want them to change overtime. Then I paint them different colors that I take from another 100 x 2040 array, one color for each…
0
votes
1 answer

How to export interactive 3D plot (.obj/html) that can be rotated 360 degree by users (Python only)

I am trying to visulize the result from a 3D bin packing model (showing how different size of items are packed in a larger bin). Below is the full code and a visulization method using matplotlib3D. However, it cannot be saved in a 3D file like…
Jack
  • 1,339
  • 1
  • 12
  • 31
0
votes
1 answer

making a 3D quiver plot using matplotlib by reading in data

I am trying to make a 3D quiver plot using matplotlib 2.2.5. I provide a simple sample code below to show my attempt. I want to make a quiver plot using fx(x,y,z), fy(x,y,z) and fz(x,y,z). These correspond to the vector field f = (fx,fy,fz). I…
Jeff Faraci
  • 403
  • 13
  • 28
0
votes
1 answer

In matplotlib 3d-plotting what is the significance of the parameters rcount, ccount, rstride and cstride in plot_wireframe?

In matplotlib 3d-plotting the function plot_wireframe takes parameters - rcount, ccount, rstride and cstride respectively. I went through the documentation for them in the matplotlib documentation but it was not very clear what they did. I played…
Anirban Chakraborty
  • 539
  • 1
  • 5
  • 15
0
votes
1 answer

Changing surface grid generated via FIT function in MATLAB

I have the following plot generated via FIT function: [xrData, yrData, zrData] = prepareSurfaceData( Vr, Vi, Cr ); %this is my data used ftr = 'lowess'; surffitr = fit( [xrData, yrData], zrData, ftr, 'Normalize', 'on' ); %Then I can plot the…
0
votes
1 answer

How do I increase the gap of 3D bar chart in y-axis?

I have a 4*7 3D bar chart where I would like to increase the gap or spacing of the 7 bars in the y-axis. Below is my code: import pandas as pd import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d import numpy as np # Set…
Catalyst
  • 426
  • 3
  • 12
0
votes
1 answer

What is the full capacity of mplot3d's scatter's 'color' argument?

What are some examples of valid inputs for the c "color" argument of mplot3d's scatter? i can input a single char basecolor such as 'r' and every datapoint is output in this color. I can input an arrays of integers or floats, with the color output…
Kama
  • 39
  • 6
0
votes
1 answer

Constructing 3D plot with 'negative' Z-axis below zero

We are working on a project in which we would like to construct 3D plots. Python is our main language, and therefore naturally chose to use matplotlib as our plotting library. Various tutorials (here, here and here) have teached us how to perform 3D…
wptmdoorn
  • 160
  • 1
  • 12
0
votes
1 answer

Plotting a solution of an integral in 3d surface (ERROR)

First of all, I am sorry for any inconvenience and my rusty english. I am trying to plot a graph of an Integral solution, and I am facing the same error "only size-1 arrays can be converted to Python scalars". when I use a simpler function instead…