Python Forum
Histogram and text file.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Histogram and text file.
#1
I have such a text file:
breast-cancer
I want to create a histogram and any other graph. Bu I have a problem. I wrote this:
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_svmlight_file
X, y = load_svmlight_file('breast-cancer.txt')
plt.hist(X,y)
And I get:
Error:
ValueError: `bins` must increase monotonically, when an array
Reply
#2
See https://stackoverflow.com/questions/4416...otonically
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Need help with NumPy Histogram function coding Triikey 1 880 May-15-2023, 01:45 PM
Last Post: deanhystad
  Plotting histogram of dataframe column Mark17 4 2,594 Jul-30-2020, 09:52 AM
Last Post: Mark17
  Can someone find out what kind of histogram is it? J_tin 1 1,759 Apr-26-2020, 05:23 PM
Last Post: buran
  Convert text from an image to a text file Evil_Patrick 5 4,214 Jul-30-2019, 07:57 PM
Last Post: DeaD_EyE
  typeerror, building histogram from data newatpython11 7 3,695 Jul-17-2019, 12:54 PM
Last Post: ichabod801
  Histogram using pandas dataframe not showing proper output ift38375 1 2,150 Jul-04-2019, 10:43 PM
Last Post: scidam
  reading text file and writing to an output file precedded by line numbers kannan 7 10,243 Dec-11-2018, 02:19 PM
Last Post: ichabod801
  how do i use get for my histogram function? pseudo 4 4,750 Oct-14-2018, 04:23 AM
Last Post: stullis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020