0

I wrote the following code:

full_list = [0, 10**3, 10**6, 10**9, 10**12, 10**15]

list1 = []
list2 = []
list3 = []

for hash_power in full_list:
    x1 = Calc1()
    list1.append(x1)

    x2 = Calc2()
    list2.append(x2)

    x3 = Calc3()
    list3.append(x3)

fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(full_list,list1,'r-->',full_list,list2,'g--o',full_list,list3,'b--o')
plt.show()

When the figure is generated, the distribution on the x-axis only produces the first and last point, ignoring all the points from the full_list in the middle.

I know the range is really big but is there a way to display it?

4
  • what library do you use for plt? Commented Jun 6, 2017 at 16:09
  • import matplotlib.pyplot as plt Commented Jun 6, 2017 at 16:09
  • What's the output for Calc1/2/3? Commented Jun 6, 2017 at 16:11
  • Calc returns the value (hash_power * 12.5* (24*60*60.0) / (678760110082*2**32)) Commented Jun 6, 2017 at 16:13

1 Answer 1

1

If you have large numeric values populating your axes - you might want to consider rescaling your figure axes such that they are logarithmic instead of linear. Steps on how to do that is found in this stackoverflow thread.

Or even more simply, customizing the scale on your figure axes in non-logarithmic increments, which is found in this thread.

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

1 Comment

Yes it worked this way N = len(full_list) n = np.arange(N) Then i replaced each full_list with n

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.