0
votes
1answer
13 views

Matplotlib.plot Histogram has extra space [duplicate]

I'm not sure how to word this; when I create my histogram it should have values from 0 to 255 [black to white values in shades of gray], but it almost always goes to around 300. Is there something in ...
1
vote
1answer
31 views

Histogram from data which is already binned, I have bins and frequency values

All the matplotlib examples with hist() generate a data set, provide the data set to the hist function with some bins (possibly non-uniformly spaced) and the function automatically calculates and then ...
1
vote
1answer
44 views

Plotting Relative Frequency vs. Absolute on a matplotlib histogram

I am aware of some similar questions but I have tried the code on them and it does not work in my environment. So I have a large list of data (floating point numbers) and I want to plot it as a ...
1
vote
1answer
15 views

matplotlib histograms and labels

I am plotting a histogram with two sets of data and want to include a key. I have found an example that uses the label command, but when I use this it doesn't work. The histogram appears correctly, ...
3
votes
1answer
46 views

memory leak in matplotlib histogram

Running the following code will result in memory usage rapidly creeping up. import numpy as np import pylab as p mu, sigma = 100, 15 x = mu + sigma*np.random.randn(100000) for i in range(100): ...
1
vote
1answer
51 views

Matplotlib histtype='stepfilled' glitch

I'm plotting some histograms and having trouble with the histtype=stepfilled. The filling curve has obviously some wrong anchor points: Or am I missing some settings? The code is pretty straight ...
1
vote
1answer
73 views

Changing values on x and y axis on a histogram

I want to plot a histogram, how many scrabble words with 2, 3, 4, 5, 6 or 7 chars are found in a dictionary over x trials with a random hand. The histogram should have the following values on the x ...
2
votes
1answer
67 views

Histogram with base 2 logarithmic y-scale in matplotlib?

Is there any way of doing this? The hist command doesn't seem to recognise it when I try and specify base or basey.
0
votes
0answers
27 views

Some texts cannot be fully displayed while drawing histograms [duplicate]

I use python to draw histogram fetching data from file 'data.txt' using the following code: #!/usr/bin/env python from pylab import * pos = [] val = [] name = [] fd = open('data.txt') i = 0 for line ...
2
votes
1answer
78 views

How can I set dataless areas of a hist2d plot to the zero-value color?

I'm tracking a subject's gaze over a specified area of a computer screen. I'm constructing gaze heatmaps using pyplot's hist2d function. Here's a simple example: figure() hist2d(xval, yval, ...
0
votes
1answer
141 views

matplotlib: histogram and bin labels

I'm trying to plot a histogram with bar chart, and I'm having difficulties figuring out how to align the x-axis labels with the actual bins. The code below generates the following plot: as you can ...
2
votes
1answer
170 views

Plot a histogram with the x axis values based on the height of the column

So say I have the following: [1,5,1,1,6,3,3,4,5,5,5,2,5] Counts: {1:3, 2:1, 3:2, 4:1, 5:5, 6:1} Now, I wanted to print a plot like a histogram that is sorted on the x axis, as in: A traditional ...
-1
votes
3answers
146 views

Sort the values in a histogram in python and plot them [closed]

So say I have the following: [1,5,1,1,6,3,3,4,5,5,5,2,5] Counts: 1-3 2-1 3-2 4-1 5-5 6-1 Now, I wanted to print a plot like a histogram that is sorted on the x axis, as in: not : 1 2 3 4 5 6 But ...
0
votes
1answer
67 views

Data handling for matplotlib histogram with error bars

I've got a data set which is a list of tuples in python like this: dataSet = [(6.1248199999999997, 27), (6.4400500000000003, 4), (5.9150600000000004, 1), (5.5388400000000004, 38), (5.82559, 1), ...
-1
votes
1answer
162 views

How to plot a 3D histogram of RGB image in python

I want to plot a 3D histogram of my RGB image. Below is my code: from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt import numpy as np from scipy.misc import imread import pylab ...

1 2 3 4 5
15 30 50 per page