How to plot graph inside docker container

+2 votes

Hi Guys,

I have my python file inside docker container. When I run this file, it will give a graph as an output. But I am not able to find any graph.  Can someone help me?

May 19, 2020 in Docker by akhtar
• 38,260 points
6,705 views

1 answer to this question.

0 votes

Hi@akhtar,

To plot a graph we generally use matplotlib library. Inside docker matplotlib works in back end. But there is a way to perform matplotlib in front end. Follow the below given steps.

  • Download tkinter module.

$ yum install python3-tkinter
  • Open your python file and write down the below codes.

import matplotlib
matplotlib.use('TKAgg')
import matplotlib.pyplot as plt
plt.plot()
answered May 19, 2020 by MD
• 95,460 points

Related Questions In Docker

0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,620 points
3,546 views
0 votes
2 answers

How to execute docker exec commande inside a docker container ?

You need to get inside the container ...READ MORE

answered Aug 13, 2019 in Docker by Sirajul
• 59,230 points
3,824 views
0 votes
1 answer

How to run a cron job inside a docker container?

Hii, crond works well with tiny on Alpine RUN apk add --no-cache ...READ MORE

answered May 18, 2020 in Docker by Niroj
• 82,840 points
5,282 views
0 votes
1 answer

How to enable SSH inside Docker container?

Hi@akhtar, To enable SSH inside Docker Container, you ...READ MORE

answered Jun 4, 2020 in Docker by MD
• 95,460 points
17,673 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,738 views
0 votes
1 answer

How to run firefox inside docker container?

Hi@akhtar, Generally, if you run firefox inside docker ...READ MORE

answered Apr 16, 2020 in Docker by MD
• 95,460 points
20,052 views
+1 vote
1 answer

How to run jenkins service inside docker container?

Hi@akhtar, By default systemctl command will not run ...READ MORE

answered May 12, 2020 in Docker by MD
• 95,460 points
5,945 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP