# Is there a bar3 from Matlab equivalent in Sage?

To look like this?

0

I don't think there is a sage command for that, but you can use matplotlib(present by default in sage) to make these kind of plots. I have pasted a sample code from this site. If you run the code below you will see 3D bar plot.

http://pythonprogramming.net/3d-bar-c...

```
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax1 = fig.add_subplot(111, projection='3d')
xpos = [1,2,3,4,5,6,7,8,9,10]
ypos = [2,3,4,5,1,6,2,1,7,2]
num_elements = len(xpos)
zpos = [0,0,0,0,0,0,0,0,0,0]
dx = np.ones(10)
dy = np.ones(10)
dz = [1,2,3,4,5,6,7,8,9,10]
ax1.bar3d(xpos, ypos, zpos, dx, dy, dz, color='#00ceaa')
plt.savefig('test.png')
```

Asked: **
2014-06-21 03:13:52 -0500
**

Seen: **440 times**

Last updated: **Jun 21 '14**

Is it possible to use Matlab Code to control SAGE?

sage for aerospace engineering

How can i generate a 3D plot with more details?

How do I save a rational matrix for Mathematica and Matlab to read?

how do i plot 3d planes like x=1

Absolute value of complex numbers in 3D plot

add a plane defined by two vectors

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.