Giter Club home page Giter Club logo

Comments (4)

oscargus avatar oscargus commented on June 8, 2024

I think that this holds for any backend, not just SVG, as it seems to stem from:

def draw_path_collection(self, gc, master_transform, paths, *args,
**kwargs):
# We do a little shimmy so that all paths are drawn for each path
# effect in turn. Essentially, we induce recursion (depth 1) which is
# terminated once we have just a single path effect to work with.
if len(self._path_effects) == 1:
# Call the base path effect function - this uses the unoptimised
# approach of calling "draw_path" multiple times.
return super().draw_path_collection(gc, master_transform, paths,
*args, **kwargs)
for path_effect in self._path_effects:
renderer = self.copy_with_path_effect([path_effect])
# Recursively call this method, only next time we will only have
# one path effect.
renderer.draw_path_collection(gc, master_transform, paths,
*args, **kwargs)

Not sure if there are cases where this is needed (in your simple path effect case, it is clearly not), if it is just a way to get code that works with any backend or if this can be simply changed though...

from matplotlib.

szsdk avatar szsdk commented on June 8, 2024

In my case, I want to use matplotlib to generate an artistic plot which contains a lot of polygons (>2000). I got the output SVG file. But basically no SVG viewer can open it.

from matplotlib.

tacaswell avatar tacaswell commented on June 8, 2024

This is fixed by #27906 (and this issue is a duplicate of #27843).

The core problem is diagnosed in #27843 (comment)

@szsdk Can you check with the pre-release pip install --pre matplotlib ?

from matplotlib.

szsdk avatar szsdk commented on June 8, 2024

@tacaswell Thanks. The pre-release solves the problem.

from matplotlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.