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

  • Home
  • SEARCH
  • 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 8970195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:41:50+00:00 2026-06-15T17:41:50+00:00

I have just started experimenting with matplotlib, since I often come across instances where

  • 0

I have just started experimenting with matplotlib, since I often come across instances where I need to plot some data, for which matplotlib seems an excellent tool. I attempted to adapt the ellipse example in the main site, so as to draw two circles instead, how ever after running the code, I find that none of the patches are displayed, I am not able to figure out what exactly is wrong… here is the code. Thanks in Advance.

import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.patches as mpatches

plt.axis([-3,3,-3,3])
ax = plt.axes([-3,3,-3,3])
# add a circle
art = mpatches.Circle([0,0], radius = 1, color = 'r', axes = ax)

ax.add_artist(art)

#add another circle
art = mpatches.Circle([0,0], radius = 0.1, color = 'b', axes = ax)

ax.add_artist(art)

print ax.patches

plt.show()
  • 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-15T17:41:51+00:00Added an answer on June 15, 2026 at 5:41 pm

    Which version of matplotlib are you using? I’m not able to replicate your results, I can see the two ellipsis quite well. I’m going by a long shot, but i guess you mean to do something like this:

    import numpy as np
    import matplotlib.pyplot as plt
    import matplotlib
    import matplotlib.patches as mpatches
    
    # create the figure and the axis in one shot
    fig, ax = plt.subplots(1,figsize=(6,6))
    
    art = mpatches.Circle([0,0], radius = 1, color = 'r')
    #use add_patch instead, it's more clear what you are doing
    ax.add_patch(art)
    
    art = mpatches.Circle([0,0], radius = 0.1, color = 'b')
    ax.add_patch(art)
    
    print ax.patches
    
    #set the limit of the axes to -3,3 both on x and y
    ax.set_xlim(-3,3)
    ax.set_ylim(-3,3)
    
    plt.show()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started experimenting with Serproxy and Arduino to get some serial data
I've only just started looking at Dapper.net and have just been experimenting with some
I am a beginner and have just started experimenting with the modeling tool in
I'm just getting started with Visual Studio (2010 Beta) and have some basic questions
I'm using a PowerPC 750 and have just started experimenting with the external interrupt.
I have just started a new database project to price customer bid proposals: Some
I just started experimenting with java today (have experience with javascript and PHP) and
Have just started to get into CakePHP since a couple of weeks back. I
OK so i just started to learn vb and did some experimenting until i
we have just started using a git account of our Django website project so

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.