0

I have the axes on my 3d graph labeled, but there is still this generic 2d frame around my 3d projection that I cant get rid of.

How do I remove the x and y [0, 1] axes around the outside of my 3d graph?

fig = plt.figure() ax = fig.add_subplot(1, 1, 1, axisbg="None") ax = fig.gca(projection='3d') ax.scatter(X[:, 1], X[:, 0], X[:, 2], c=labels, alpha=0.4) ax.set_xlabel('Pressure Integral', fontsize=12, color='blue', rotation=150) ax.set_ylabel('Total Gallons', fontsize=12, color='blue') ax.set_zlabel('Duration (seconds)', fontsize=12, color='blue', rotation=60) ax.yaxis._axinfo['label']['space_factor'] = 3.0 

enter image description here

2
  • The frame is there because you put it there with your code. Without knowing the code that produces this plot, that's all once can say. Please read and understand minimal reproducible example. Else this becomes the great guessing game. Commented Jan 19, 2018 at 15:50
  • @ImportanceOfBeingErnest I absolutely did not put it there, see code Commented Jan 19, 2018 at 16:09

1 Answer 1

1

You "absolutely" did put the line

ax = fig.add_subplot(1, 1, 1, axisbg="None") 

in your code. Remove this line, to get rid of the axes that is produced by it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.