0

I have a sequence of data points with a significant peak at 1 point

1
18
120
196
476
10716
42
43
96
27
61
50
31
15
9
6
11

When I plot the data using the webplotlib python package, the 10716 peak distorts the resulting plot in a way so that the smaller values appear almost as a "flat" line. I am describing the problem with my own words since I don't have enough background knowledge about statistics. What is the best way / algorithm to smooth the peak a bit, so the other data becomes "more visible"? I already tried gaussian smoothing (link), but it appears to not be an appropriate techniqe.

enter image description here

1
  • 3
    Try using a log scale. Commented Jun 9, 2014 at 18:03

1 Answer 1

1

Using GWW's idea, you could use plt.semilogy:

import numpy as np
import matplotlib.pyplot as plt
x = np.loadtxt('data')
plt.semilogy(x)
plt.show()

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

The other option to think about is to use a broken Y axis (e.g., matplotlib.org/examples/pylab_examples/broken_axis.html). If you need your y-axis to be linear and there is only one or two points "way up there" then you could try this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.