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 7610767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:29:51+00:00 2026-05-31T01:29:51+00:00

I want to draw x=0 and y=0 axis in my contour plot, using a

  • 0

I want to draw x=0 and y=0 axis in my contour plot, using a white color. If that is too cumbersome, I would like to have a white dot denoting where the origin is.

My contour plot looks as follows and the code to create it is given below.

xvec = linspace(-5.,5.,100)                               
X,Y = meshgrid(xvec, xvec)                                
fig = plt.figure(figsize=(6, 4))                      
contourf(X, Y, W,100)                             
plt.colorbar()                                    

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-05-31T01:29:52+00:00Added an answer on May 31, 2026 at 1:29 am

    There are a number of options (E.g. centered spines), but in your case, it’s probably simplest to just use axhline and axvline.

    E.g.

    import numpy as np
    import matplotlib.pyplot as plt
    
    xvec = np.linspace(-5.,5.,100)                               
    x,y = np.meshgrid(xvec, xvec)
    z = -np.hypot(x, y)                                
    
    plt.contourf(x, y, z, 100)                             
    plt.colorbar() 
    
    plt.axhline(0, color='white')
    plt.axvline(0, color='white')
    
    plt.show()
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to Draw multiple line Graph with each line have different color and
I have 3d mesh and I would like to draw each face a 2d
I want to draw only 10 Majors Ticks on my Y axis. For that
I want to draw a simple bar plot like so: test <- data.frame(y=c(1,3,53,10,30,35,50), x=c(1:7))
I'm using C# chart control to draw a nyquist plot. Now i want data
I want to draw rectangle that is only specified percent high of panel im
I want to draw an area from given points on a map using the
i want to draw line, i have two textfiled in which i enter some
I want to draw an arc using canvas using a gradient fill. How can
I want to draw an x-y-diagram with axis labels. Unfortunately the ylabel is misplaced.

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.