Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:26:31+00:00 2026-06-17T10:26:31+00:00

I am plotting the following image in matplotlib. My problem is that, the image

  • 0

I am plotting the following image in matplotlib.
My problem is that, the image looks good like this, however, I would like to make the background darker, as when I print this image, the grayscale part does not appear in the print. Could someone tell me API to make this change?

I use simple API to plot the 3D curve –

ax.plot(X1, Y1, Z1, '^', c='r')
ax.plot(X2, Y2, Z2, 'o', c='b')

enter image description here

What I also tried is this –

fig = plt.figure(figsize=(10,10))
ax = fig.gca(projection='3d',  axisbg='gray')

This changes the color to dark gray, but it is also changing the colour outside the image –

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:26:33+00:00Added an answer on June 17, 2026 at 10:26 am

    I achieved it by using following code –

    ax = fig.add_subplot(111, projection='3d')
    plt.gca().patch.set_facecolor('white')
    ax.w_xaxis.set_pane_color((0.8, 0.8, 0.8, 1.0))
    ax.w_yaxis.set_pane_color((0.8, 0.8, 0.8, 1.0))
    ax.w_zaxis.set_pane_color((0.8, 0.8, 0.8, 1.0))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm plotting some data curves with gnuplot, and they look like this: However, the
How can I make it such that plotting the following function ListPointPlot3D[points, PlotStyle ->
I am plotting a confusion matrix with matplotlib with the following code: from numpy
I'm plotting some data with a different X range and I would like to
When plotting a function using Plot, I would like to obtain the set of
Black line in the following graph is plotting using the below command for matplotlib
When plotting color-maps using gnuplot, I usually use the following lines: ... set palette
When plotting on a figure in MATLAB, I have noticed that parts of the
I am plotting boxplots from this data: MY_LABEL MY_REAL MY_CATEGORY 1 [POS] .56 POS
I'm plotting data in Python using matplotlib. I am updating the data of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.