when using matplotlib to draw a line chart, it is normal to draw it the first time, but the second time it is connected from beginning to end.
when using matplotlib to draw a line chart, it is normal to draw it the first time, but the second time it is connected from beginning to end.
Please check the data to see if there is such a situation as [1 hr class= 2 answer 3 4 5 1], that is, from the origin to the origin.
in addition to the supply code, how can people judge the problem?
the problem has been solved. If a small partner has this kind of problem. You can check whether the source data is incorrect. Because I have a lot of code and miscellaneous, so I didn't post it. For example, the data used for the first drawing is x = [1, 2, 3, 4, 5, 6], y = [10, 12, 13, 11, 10, 13]; Later, I need to redraw the graph. Although I use the cla () method and query the new data x = [7, 8, 9, 10], y = [9, 11, 10, 8] and then draw the graph, because the x and y data in my code are stored with the class attributes of the object, I did not empty the original data. The data of the second drawing becomes: X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], y = [10, 12, 13, 11, 10, 13, 9, 11, 10, 8]. As a result, the above results are produced. Not only that, but the axes also produce strange changes. I was convinced myself.
Previous: Why prompt Cannot read property 'getElementsByClassName' of undefined
Next: Mini Program developer uses webpack to package pug,stylus files
it was an error creating a new canvas in Jupiter notebook. I don t know why? ...
print ( " Web page display * ") < H1 > dynamic visualization of define custom toolbar location, web pages < H1 > class TopToolbar (mpld3.plugins.PluginBase): """Plugin for moving toolbar to top of figure"&quo...