Giter Club home page Giter Club logo

Comments (5)

ufoym avatar ufoym commented on May 10, 2024 12

When you want to use matplotlib in deepo, we suggest using a non-interactive backend such as agg. In your figure-generating script, just call the matplotlib.use() directive before importing pylab or pyplot:

import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
plt.plot([1,2,3])
plt.savefig('myfig')

from deepo.

lucasrodes avatar lucasrodes commented on May 10, 2024

Hi Thanks for your rapid response. I used matplotlib.use('agg') and it worked.

from deepo.

tunveyyy avatar tunveyyy commented on May 10, 2024

using matplotlib.use('Agg') did not work for me and shows the following error

import matplotlib
matplotlib.use('Agg')
main:1: UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called before pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

The backend was originally set to 'TkAgg' by the following code:
File "", line 1, in
File "/home/tunveyyy/virtualenv_python3/env/lib/python3.4/site-packages/matplotlib/pyplot.py", line 72, in
from matplotlib.backends import pylab_setup
File "/home/tunveyyy/virtualenv_python3/env/lib/python3.4/site-packages/matplotlib/backends/init.py", line 14, in
line for line in traceback.format_stack()

from deepo.

lucasrodes avatar lucasrodes commented on May 10, 2024

Hi, did you try with lower case?

import matplotlib
matplotlib.use('agg')

from deepo.

ksajjan avatar ksajjan commented on May 10, 2024

Hi, In the below case

This call to matplotlib.use() has no effect because the backend has already

Just restart the terminal.

from deepo.

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.