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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:46:31+00:00 2026-06-13T20:46:31+00:00

I am wondering if it is possible to remove any shape that is fully

  • 0

I am wondering if it is possible to remove any shape that is fully covered by other shapes?
I am often generating scatter plots of particles where some of them are located close to each other and since the number of particles can easily be 100k these plots become quite overwhelming.

Consider the following simple example:

    import matplotlib.pyplot as plt
    import numpy as np
    N = 10000
    x = np.random.randn(N)
    y = np.random.randn(N)
    plt.scatter(x,y)
    plt.savefig('unseen.pdf')

When using a value of N that is greater than 10000 a large majority of the circles are underneath other circles and cannot be seen. However, when opening the resulting pdf-file all circles are drawn and the time to open the file is increasing even though the number of visible circles is almost the same.

Time to open figure in pdf-viewer (doesn’t matter which):

N=10000 > 5s (2.4MB)

N=20000 > 10s (4.8MB)

N=40000 > 20s (9.5MB)

A linear increase both in time and file size, just as expected when increasing the number of circles.

Does anyone have an idea on how one could get around this?

  • 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-13T20:46:31+00:00Added an answer on June 13, 2026 at 8:46 pm

    I think you should save the plot as a raster image and then embed it into a pdf (cairo module works great).

    In my experience, most people won’t zoom so much inside a PDF so as to make a difference between vector and image. Besides, your vector stuff is heavy enough to justify the use of a higher DPI image without increasing filesize.

    Also, a good tip is to plot transparent circles without borders, using ms (markersize) and mew (marker edge width) and alpha keyword parameters. The visual effect is stunning. Instead of

    plt.scatter(x, y)
    

    you can do

    plt.plot(x, y, 'o', ms=3, mew=0, alpha=0.3)
    

    try and see!

    Hope this helps!

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

Sidebar

Related Questions

I am wondering if it is possible to delete, that is remove from use,
I am wondering if it is possible to remove a tag but leave the
I was wondering ( if possible ) if there was a program/tool/utility that when
Just wondering is it possible to build CLI app that can be run from
I was wondering - is it possible to change files that are stored on
I was wondering if it is possible to remove the contents of a specific
I am using iOS 4. I am wondering that is it possible to connect
Is there any reason for it is not possible with Visual Studio to remove
just wondering how it's possible to un-select the select option box, i used .remove()
I was wondering if it would be possible to remove columns within a data

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.