Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
458 views

How to add text on surfaces of cubes. I'm trying to solve 3d packing problem but i have problem visualization because if there were 1000 cubes, how to identify each of them.So i need to write number ...
LogicLover90's user avatar
0 votes
0 answers
305 views

I am trying to project a 3D cube onto a 2D image and I am looking for an effective way to draw the surface of this cube. I'd like to avoid using some of the existing solutions such as wire_frame, as ...
neerbasu's user avatar
1 vote
0 answers
175 views

I have a polynomial function, let’s say a+bx+cx^2. I show the function in a 2d plot, but I want to progress to show it in 3d. But not just showing it, giving it height, so if I have x,y I set a Z1 ...
DanielShvartz's user avatar
3 votes
0 answers
732 views

Problem summary I have a mesh made by quadrilateral elements with a scalar field defined over the nodes of the elements. I am using Poly3DCollection to plot the mesh with the elements coloured by the ...
fma's user avatar
  • 319
0 votes
0 answers
675 views

# In order to use the 3D plot, the objects should have a certain shape, so we reshape the targets. # The proper method to use is reshape and takes as arguments the dimensions in which we want to fit ...
Shaaran S.R.'s user avatar
1 vote
1 answer
521 views

I have an array of Clusters using Dimensionality Reduction n = 2 and it is plotted in 2D with the following code: f, (ax1, ax2, ax3) = plt.subplots(1, 3, figsize=(24,6)) # labels = ['No Fraud', 'Fraud'...
feruciform's user avatar
0 votes
1 answer
230 views

I want to draw a bar plot in 3d. I know how to do that using the following code: from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np fig = plt.figure(figsize=(10,...
sam's user avatar
  • 113
0 votes
1 answer
132 views

I am trying to make a 3D plot from the following lists: X-axis: S = [1.0, 3.0, 5.0, 7.0, 9.0,11.0,13.0,15.0,17.0] Y-axis: T = [0.25,0.5,1,2,3,5] Z-axis: Diff_025 = [-0.0, -0.0001, -0.0002, -0.0027, ...
Tobias's user avatar
  • 23
1 vote
1 answer
710 views

I want to add constant x, y, z lines into a matplotlib 3D scatter plot in Python which extended from this limit point, may I know how could I do so? x_limit = [-0.5] y_limit = [151] z_limit = [1090] ...
hy0916's user avatar
  • 11
0 votes
2 answers
680 views

I want to plot a 3d velocity vector field using a 3d quiver plot in python, from 3 data files (.npy) that give u, v and w components of velocity in the x, y and z directions. This what I have done so ...
Brendan Darrer's user avatar
0 votes
1 answer
594 views

I have searched far and wide for a way to remove the tick text but not the actual grid lines from a 3D matplotlib plot. I unfortunately still have no idea how to do it, as most solutions seem to only ...
zucian's user avatar
  • 31
0 votes
0 answers
104 views

Is there a function to calculate rapidly the normal vectors of each of the meshes of my grid? I'm looking to have vectors of the form n = [nx, ny, nz], for the example below it is easy to calculate it ...
Alexandre M.'s user avatar
1 vote
1 answer
59 views

I have a code that produces a sphere. I want to change the coordinates in which the sphere spawns import numpy as np import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from matplotlib ...
Tom's user avatar
  • 55
1 vote
2 answers
6k views

I have computed a lot (~5000) of 3d points (x,y,z) in a quite complicated way so I have no function such that z = f(x,y). I can plot the 3d surface using import numpy as np import matplotlib.pyplot as ...
confusedstudent's user avatar
1 vote
0 answers
304 views

I am trying to plot a number of components in 3d space (in python), but am having issues with the rendering. As an example, the code below plots a sphere with some points on its surface, a ring ...
roboguy222's user avatar
0 votes
1 answer
553 views

Program Description: I have a phone sending gyroscope data every 2 seconds to a server. Every second I retrieve data from the server. The purpose of my program is to read this data stream and make a ...
JoshJohnson's user avatar
0 votes
1 answer
677 views

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 ...
Cody's user avatar
  • 3
2 votes
2 answers
4k views

How do I convert a 3D object in any STL file into a JPG or PNG image. I tried searching a little bit online but I wasn't been able to arrive at finding any possible solutions. Can anyone help me with ...
Amine's user avatar
  • 31
0 votes
1 answer
488 views

I have been trying for around 2 days now to create the 2 half-moons data set in 3 dimensions. First, I did it in two dimensions, and this link is very helpful for understanding how to plot the data ...
jbg05's user avatar
  • 51
1 vote
0 answers
81 views

I have used the following code: import numpy as np import matplotlib.pyplot as plt def f(x, y): return ( ((np.log(x**2) / np.log(y**3)) / x**2 )*500) x = np.linspace(0, 600, 4) y = np.linspace(0, ...
Giampaolo Levorato's user avatar
0 votes
1 answer
257 views

I am trying to build a plot in 3d with matplotlib which has a dot at [0,0,0] and a quiver (vector) "looking" to it from [10, 10, 10]. But when I run the code I only get the dot. Why is that ...
Julian's user avatar
  • 27
0 votes
1 answer
697 views

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 ...
user8953650's user avatar
  • 1,030
0 votes
0 answers
350 views

Just starting with 3D plotting in Matplotlib. In the image below, how can I reverse the x and y axes and have a common origin of 0 for both the axes as written in red ink ? I could not find something ...
lqope54's user avatar
  • 93
0 votes
0 answers
132 views

I would like to plot two 3D Histograms in the same figure so as to compare them. I would prefer if the colors were translucent so that the two bars of different colors remain distinguishable to the ...
Rithvik's user avatar
0 votes
2 answers
1k views

In my current project, I want to plot a 3D shape with pyplot. This is relatively straightforward: The complication comes from the fact that I would like the figure to display in a straight 2D figure ...
J.Galt's user avatar
  • 553
1 vote
1 answer
406 views

I realized a slight "misalignment" of a plot I'm making in 3D with matplotlib. Here is an MWE: import numpy as np from matplotlib import pyplot as plt figure = plt.figure(figsize=(8,10.7)) ...
Imahn's user avatar
  • 566
0 votes
1 answer
892 views

I am able to plot a 3D surface plot with a 2D contour plot just fine but I would also like to share the x axis of the 2D plot using ax.twinx() like I've done in a separate plot here: However, when I ...
user3006887's user avatar
0 votes
0 answers
115 views

I have a data set of the following class: class Event: def __init__(self, timestamp, lx, ly, lz, nature): try: self.timestamp = datetime.strptime(timestamp, "%d/%m/%Y %H:%M") ...
Ali11H's user avatar
  • 33
0 votes
1 answer
3k views

I want to have 10 moving points. I used the code below. I'm experimenting with matplotlib which I don't know very well. from matplotlib import pyplot as plt import numpy as np from matplotlib import ...
Kώστας Κούδας's user avatar
0 votes
1 answer
2k views

So I have 8 3d plots (7 3d plots and one 2d plot) I want to position them in 4 x 2 format. Here is my code for it: sensor_data = self._util_sensor(sub_df) fig = plt.figure() fig.tight_layout() ax = ...
user18065369's user avatar
0 votes
1 answer
6k views

I have two 3D-points, for example a = (100, 100, 10) and b = (0, 100, 60), and would like to fit a line through those points. I know, the 3D line equation can have different shapes: Vector-form: (x,...
user_mechtronics_13's user avatar
1 vote
1 answer
544 views

I would like to plot the line: (x^2)/11.39 + (y^2)/6.25 = 1 rotated around the x-axis for a project I am working on. I have used matplotlib to graph some 3D planes before but am unable to figure out ...
ArduinoBen's user avatar
0 votes
1 answer
959 views

I have seen matplotlib invisible bar if height is zero - however, that is for the 2D case of bar plot, so I couldn't quite apply it to my problem. I have also seen Make transparent color bar with ...
sdbbs's user avatar
  • 5,948
1 vote
1 answer
2k views

I'd like to create a 3D plot from an equation with x and y, similar to Google's 3D graph. An example: input: sin(sqrt(x**2 + y**2)) output (3D plot): The Z will obviously be equal to the given input, ...
Itzsten's user avatar
  • 104
1 vote
1 answer
933 views

This question is related to Set size of matplotlib figure with 3d subplots. Here is an exmple code. fig = plt.figure() fig.set_size_inches(10, 4) ax = fig.gca(projection='3d') The code above is the ...
J. Choi's user avatar
  • 1,875
-1 votes
1 answer
769 views

The zticks and Z axis are overlapping in a 3D plot. How to adjust the spacing between these two? I think this is happening because of the because of more number digits after the decimal point.
Aim's user avatar
  • 537
1 vote
1 answer
2k views

I want to create a 2d slice contour plot in 3d with the range of x and y larger than the given xlim and ylim. However, when I set xlim and ylim the contour seems to be extended outside of the axes. I ...
Winston Wu's user avatar
2 votes
1 answer
3k views

The Data I have a vector field, which is 0 in all components except for the z component. I just have the data for one slice of this field. My goal is to show this slice in a 3D plot. The slice: ...
henry's user avatar
  • 967
0 votes
1 answer
232 views

I want to have my color bar change with each element and represent the Ionization # in the data set below: Ionization # Name Nebulizer 1 Nebulizer 2 Nebulizer 3 0 4.341 Potassium ...
Julian Avila's user avatar
1 vote
0 answers
1k views

My data needs to be plotted on a log scale in order to be able to see some of my really small values, however, I can't seem to find any way to do it on a 3D bar plot. Supposedly in a 2D bar plot you ...
Julian Avila's user avatar
0 votes
1 answer
322 views

I am attempting to create a 3d quiver plot of velocity vectors, using 3 arrays containing the vectors in x, y, z space with respect to time. I.e. a video of the quiver plot. Can someone help with this?...
Brendan Darrer's user avatar
0 votes
1 answer
860 views

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....
Catalyst's user avatar
  • 426
2 votes
1 answer
1k views

I have a table that contains three different time characteristics according to two different parameters. I want to plot those parameters on x and y-axis and show bars of the three different times on ...
Ruli's user avatar
  • 2,831
4 votes
2 answers
9k views

I want to set axis limits in matplotlib 3D plot to get rid of the value over 15,000. I used 'set_zlim', but happened some error on my results. how can I do? from mpl_toolkits.mplot3d import Axes3D ...
Andy_KIM's user avatar
0 votes
1 answer
1k views

I am currently trying to plot a 3D scatter plot by using a 3D array. What I found online about plotting 3D scatter plot looks something like ax.scatter3D(x, y, z) where x, y , z are all 1D array. ...
sttc1998's user avatar
1 vote
1 answer
512 views

I have 3 lists which contain the x cordinates, y coordinates and z coordinates respectively. I am trying to track the position in 3D space. I use the below code: fig = plt.figure() ax = p3.Axes3D(fig) ...
sra7687's user avatar
  • 313
0 votes
1 answer
3k views

I am trying to plot a few histograms on a 3d axis using the PolyCollection function, my desired plot looks something like this: (except of course the coloured plots are histograms) For me, my x-...
Lisa Goh's user avatar
  • 109
1 vote
1 answer
2k views

I have a dataset I display it in 3D. now I have to look deep into that 3D plot. because there is a hole in it and I have to find it. Now I don't know how to do it. The 3D I display. and I want to ...
Osama Billah's user avatar
2 votes
0 answers
6k views

I'm new to coding and am trying to Frankenstein a graph for a research presentation. I would like to add an error bar to each bar value. Any help would be really appreciated. This is what I have so ...
Tiny Engineer's user avatar
5 votes
1 answer
6k views

How can we make spheres of radius R centered at given coordinates(x,y,z). Like if there are 10 set of coordinates for the centers of the spheres and correspondingly 10 different values of the radii. ...
Simrandeep Bahal's user avatar

1 2 3
4
5
8