0

Suppose I have two arrays:

Y = [1,2,3,4,5, 10000]
X = [1,2,3,4,5,6] 

I want to have a plot like: plt.plot(X,Y). But, the 10,000 number is huge and thus it distorts my plot. Is there anyway to show 10000 on y axis such that the other values will also be seen properly.

Chris
  • 29,127
  • 3
  • 28
  • 51
user2512443
  • 485
  • 1
  • 6
  • 20
  • 2
    Try exponential scaling? – Yu Zhang Mar 29 '19 at 02:18
  • plot it with a [logarithmic axis](https://matplotlib.org/2.0.0/examples/pylab_examples/log_demo.html) – wwii Mar 29 '19 at 02:21
  • I prefer to show 10000 as an string just a bit above 5. For me numbers 1 to 5 are important. 10000 is an outlier. – user2512443 Mar 29 '19 at 02:22
  • 3
    See [Is there a way to make a discontinuous axis?](https://stackoverflow.com/questions/5656798/python-matplotlib-is-there-a-way-to-make-a-discontinuous-axis) and [Break // in x axis of matplotlib](https://stackoverflow.com/questions/32185411/break-in-x-axis-of-matplotlib) – ImportanceOfBeingErnest Mar 29 '19 at 02:24
  • See also [this](https://stackoverflow.com/a/45107420/2454357). – Thomas Kühn Mar 29 '19 at 06:59

0 Answers0