I was reluctant to open another topic but I found the discussion interesting.
I’m working on a project with several figures made in pygmt. The scripts are on github. After a full weekend with many figures made, I transferred the result to git, and now on Monday I brought it to my Unix environment. The environments are the same, the same packages, the same versions. The only difference is that at home I work with Windows and here at work with Ubuntu 20.04.
To my surprise, several problems appeared. I’m still not sure if it’s with pygmt or pandas (in this example).
A simple test below:
import pandas as pd
import pygmt
import numpy as np
df = pd.DataFrame({'x':[1,5,8],
'y':[1,3,5],
'zbot':[20,50,60],
'ztop':[50,70,80]})
df['z'] = df.zbot-5
region = [0,10,0,10,0,100]
fig = pygmt.Figure()
fig.basemap(region=region,
perspective=[135,30],
frame=['xg1a+l"X"','yg1a+l"Y"','zag10+l"Z"','WSenZ'],
zsize='5c',
projection='X12c',
)
fig.plot3d(x=df.x,y=df.y,z=df.z,
style=f'o0.3c+b{df.ztop}',
perspective=True,
color='red',
zsize='5c')
fig.show()
As a result I get this here (but I guarantee that at home, in pygmt installed on windows, it works! I clearly see the figure with the 3 cubes plotted).
plot3d [ERROR]: Cannot find file 50
plot3d [ERROR]: Cannot find file 70
plot3d [ERROR]: Cannot find file 80
plot3d [ERROR]: Cannot find file ztop,
plot3d [ERROR]: Cannot find file dtype:
plot3d [ERROR]: Cannot find file int64
What am I doing wrong?