Mic :
Thank you for your solutions. However, with my dataset it did not work
out with the following code:
...
Please find attached the histogram. The dataset I am sending with
next email.
1. You haven'sent *in.small.txt*, but *in.txt*, 70 MB, several millions
lines. Please, be g
Thank you for your solutions. However, with my dataset it did not work out
with the following code:
import numpy as np
import matplotlib.pyplot as plt
with open('in.small.txt') as f:
data = list(int(no.rstrip()) for no in f)
mean = np.mean(data)
print 'mean', mean
std = np.std(data)
print 'std',
Jerzy et al,
Check out the axvline method (of pyplot or an axes object). You'll
only have to specify the x-value, and it'll won't rescale your y-axis.
-paul
On Thu, Mar 8, 2012 at 4:50 AM, Jerzy Karczmarczuk
wrote:
> Nicolas Rougier, (to Mic, who can't see a histogram and a line
> simultaneously
Nicolas Rougier, (to Mic, who can't see a histogram and a line
simultaneously):
> You need to specify the ylim because your height may be larger than your
> histogram and then you cannot see it.
I suspect something similar. The height of matplot_hist.png is 0.040.
The line goes from 0 to 300. T
You need to specify the ylim because your height may be larger than your
histogram and then you cannot see it.
Here is a script that reproduce your screenshot (with random data).
import numpy as np
import matplotlib.pyplot as plt
plt.rc('xtick', direction = 'out')
plt.rc('ytick', direction =
Mic:
Hello,
I am able to draw a histogram with the following code:
/.../
/h.hist(hist_data, bins=50, normed=True)/
However, I don't know how to draw a line for median at 249 position
like in attachment.
Are your axes really matplotlib axes? (I have doubts, since the vertical
is not normed, al