Home > other >  MAXPLOT painting figure on how to prohibit the decimal display when the mouse move to check the data
MAXPLOT painting figure on how to prohibit the decimal display when the mouse move to check the data

Time:10-01




This is I use MAXPLOT painting figure, the X axis and Y axis no decimal, but the mouse move on the diagram but a decimal, this how to ban?

The source code
 # coding: utf-8 
The import numpy as np
The import matplotlib. Pyplot as PLT

# generate data
The import time

The from matplotlib import ticker

Ka=np. Full ((500), 100);
# print (ka)
For I in range (0500) :
Print (" start: ka [" + STR (I) + "]="+ STR (ka) [I])
For j in range (0100) :
Nano_time=time. Monotonic_ns ()
# print (" nano_time="+ STR (nano_time))
Target_index=nano_time % 500;
# print (" target_index="+ STR (target_index))
Ka [target_index] +=1;
Ka [I] -=1;



PLT. RcParams [' font. Sans-serif]=[' SimHei] # used to display Chinese label normal
PLT. RcParams [' axes. Unicode_minus]=False # is used to display normal minus

PLT. Title (', 500, to 100 yuan per person, one yuan each distributed randomly 10000 times to others, how much money is 500 people per ')
PLT. Xlabel (' personnel ')
PLT. Ylabel (' balance ')

Xa=np. Arange (0500, 1)
Print (xa)

PLT. Ticklabel_format (useOffset=False)

PLT. The plot (ka)
PLT. The show ()

CodePudding user response:

Top, please inform ~ didn't get online

CodePudding user response:

Help see not
  • Related