Questions tagged as 'matplotlib'

1
answer

Display only hours, minutes, and seconds on a chart whose entry is in unix time

Be the Python code that generates a bar chart: # -*- coding: utf-8 -*- import matplotlib.pyplot as plt import matplotlib.dates as dates from datetime import datetime, timedelta x = [] y = [] with open("dados.csv") as f: for l in f:...
asked by 03.09.2017 / 19:37
1
answer

Bar chart made in Python was "weird". Any suggestions on how to improve it?

Friends, The following graphic was generated: Thecodeusedwasasfollows:#-*-coding:utf-8-*-importmatplotlib.pyplotaspltimportmatplotlib.datesasdatesfromdatetimeimportdatetime,timedeltax=[]y=[]withopen("dataset_semAtaques__10Abril2017_1min.c...
asked by 22.08.2017 / 16:54
1
answer

Data classification of network attacks (attack or non-attack)

I'm using the dataset: https://www.unsw.adfa.edu.au/unsw-canberra-cyber/cybersecurity/ADFA-NB15-Datasets/ The purpose is to classify a sample as attack or non-attack. Is it a good idea to use logistic regression? I made the code below to...
asked by 10.06.2018 / 21:46
1
answer

How to delimit plot area in python?

The figure is cutting the subtitles, how do I get it? # Libraries import matplotlib.pyplot as plt # Make data group_names=['0,89% - Tração Animal e Propulsão Humana', '45,08% - Passageiro e Misto',...
asked by 16.06.2018 / 23:47
1
answer

Python chart does not display all desired values

I would like the graph to show only the values of the x, y coordinates corresponding to the points. But it's not like this: Forexample:ThepointwhoseXcoordinateis04/10/201709:41:00doesnotdisplaythevalueofitsYcoordinate.Thenextdotdoesnotdispla...
asked by 02.07.2017 / 19:57
1
answer

How can a colormap of a surface be mapped to a scalar function?

Translation of question I asked no OS : I have a scalar function that represents the electrical potential on a spherical surface. I want to plot, for a given radius, the surface and map its color points based on the potential function. Ho...
asked by 01.05.2017 / 16:45
0
answers

How to do python only read the file when it is complete

I'm doing a program that reads a .txt file that updates itself in the execution of another program in fortran and creates a real-time animation of the temperature map of a board, however it is giving an error because the fortran is updating the...
asked by 31.08.2018 / 15:29
1
answer

Error generating matplotlib graph

I'm new to Python and I'm having a hard time with my algorithm. Its function is to check words in a set of files in PDF format and to analyze the recurrence of each word, generating with this information a graph of the law of zipf second most re...
asked by 11.09.2017 / 21:40
1
answer

Problems with contour () in python

Hello, I'm having some problems with the contour () function of pylab. In the final image, the x and y axis values are ranging from 0 to 600, which was the amount of intervals in my arange (). However, I wanted the values of x and y (-3 to 3) to...
asked by 31.08.2015 / 03:33
2
answers

Database graph does not appear python matplotlib

The outline of the graph appears, but empty, with no data. import sqlite3 import matplotlib.pyplot as plt import matplotlib.dates as mdates connection = sqlite3.connect('escola.db') c = connection.cursor() sql= "SELECT DATE_EXTRACTION, NOT...
asked by 05.03.2017 / 22:08