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

Plot 3D Contour from an Image using extent with Matplotlib

As I present here (in 2D), I'm wondering if how I could "scale" an image input to be plotted to a range in the plot. To be more clear, this is what I need: I have a 400 * 400 image that is generated based on a function which interval is -1..1. So, I…
pceccon
  • 9,379
  • 26
  • 82
  • 158
0
votes
3 answers

MATLAB set('XData'....)

I'm having a problem updating my plot. Basically, I have a function that creates a figure with 3 subplots. Then I have another function that runs the create figure function and then updates the plot. It's important to just update so I don't create a…
spaderdabomb
  • 942
  • 12
  • 28
0
votes
2 answers

mplot3d gives blank graph but no error

So I am trying to plot a 3d chart using mplot3d with matplotlib. Code as following: # generate the graph # vols is a 2D array indexed by [maturity, strike]. def DrawGraph(self, strikes, maturities, vols): import matplotlib.dates as dates …
Alex Suo
  • 2,977
  • 1
  • 14
  • 22
0
votes
1 answer

2d surface plot in 3d. Plotting the indices of the peak on the graph (possibly by identifying the peaks ?). Python

I am trying to plot 2D surface plots in 3d using mplot3d module. I know how to "manually" find the max value and its position (in terms of row and column), which is very important in what I am doing. Is there a way to plot that information onto the…
leb
  • 544
  • 1
  • 6
  • 17
0
votes
1 answer

How to get heat colors with plot3d in scilab?

Hi this may seem to be a simple question but I am having a hard time understanding how to use the colors in a plot3d. That is what I have: // x, y and z are matrix 4 by 100 myColors =…
Paul Fournel
  • 10,807
  • 9
  • 40
  • 68
0
votes
1 answer

Matplotlib 3D Scatter - Equal Aspect Ratio

I'm trying to make a 3D scatter plot using matplotlib. The issue I'm running into is that the plot isn't using a 1:1 aspect ratio between all pairs of the axes. Would anyone know how to fix this? My code looks something like this: from…
astromax
  • 6,001
  • 10
  • 36
  • 47
-1
votes
1 answer

I have a list of 3D coordinates over time, that is, a video of points. How can I visualize this in Python?

So the data might look like: at time 0 : [(8,8,9), (2,4,5), ...] at time 1 : [(3,5,1), (7,4,3), ...] ... at time N : ... I need to visualize these points in a video using Python.
Sam Lerman
  • 301
  • 2
  • 8
-1
votes
1 answer

Surface Plotting on Python 2.7 with pyplot

I am new to Python. I have been trying to plot a data file that contains 3 columns and 1024 data points. While running the code the following error arises: Traceback (most recent call last): File "plot-data.py", line 27, in
Galilean
  • 246
  • 4
  • 15
-1
votes
1 answer

Plot an energy potential with matplotlib

I want to plot the gravitational energy potential to highlight its extremums (the Lagrangian points around two celestial bodies). Here is the function that returns the potential for each set of coordinates x and y: def…
Loïc Poncin
  • 511
  • 1
  • 11
  • 30
-1
votes
1 answer

Surface plot not graduating colours

I'm working with python 3.4. I'm trying to plot a simple surface from a 2D array (11x13), but the colour map is not graduating properly. There's only a small range, but the colour bar looks reasonable while the plot just has stripes. Doesn't seem to…
MNoteboom
  • 1
  • 1
-1
votes
1 answer

ValueError in matplotlib

I'm trying to plot a 3D plot from an array p. However, I get an error. What's the reason for it and how can I overcome this? Code import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import numpy as np import matplotlib.pyplot as…
-1
votes
1 answer

generate wireframe plot with mplot3d Python2.7

I have this data : 69120 40859 258 69219 40860 255 69319 40862 228 .... 69519 40865 263 69619 40867 266 69719 40869 261 It's the positions of points in a 3D graph (X,Y,Z), called a filiation of points I have multiple filiations : 69120 41459…
-2
votes
2 answers

Python : Best way to draw 3d function with random x and y

I generated a 2d array, in each row, there is a random x, random y and f(x,y). I chose random x and y because f(x, y) is very long to compute. I used Axes3D from mpl_toolkits.mplot3d to draw the result : ax.scatter(tableau[:,0], tableau[:,1],…
-2
votes
1 answer

How to plot with mplot3d

I am trying to plot the solutions of a minimization problem, 'X, Y = meshgrid(gammas, psis)' gammas and psis are my 2 axes, 'mplot3d(X, Y, x)' x is the solution of my problem, While executing my script : name 'mplot3d' is not defined......
Abdallah
  • 71
  • 1
  • 7
-3
votes
1 answer

3D plotting of points

I want to use python to plot some specific points in 3D given their coordinates. I want to use the matplotlib library but I'm not sure if there's an easy way of doing this. Let's say I want to plot the following…
1 2 3
26
27