Matplotlib Python -


I need to print the graph with a cherry and maplelib once on a webpage. I am able to load the graph but the content can get the coordinates of the conspiracy on-home appliances. Can someone suggest how I can get coordinates? Do I have to use javascript or matlotib, which can meet the requirement. The code looks like this: Import matplotlib matplotlib.use ('Agg') Import matplotlib.pyplot as the class class HelloWorld: Def Index (self): fig = plt.figure () Ax = Fig.add_subplot (111) ax.plot ([1,2,3]) fig.savefig ('test.png') returns' '' & lt; Img src = "test.png" width = "640" height = "480" range = "0" /> '' 'Index.exposed = true import os.path tutconf = os.path.join (os.path.dirname (__ file__),' tutorial.conf ') if __name__ ==' __main__ ': cherrypy.quickstart (hello ), Config = tutconf) Other: cherrypy.tree.mount (hello (), config = tutconf)

Therefore, if this is your only requirement, then you are close to your solution: Make the conspiracy file server side and distribute it to the client.

However, it seems that this is not the only requirement (you really want to express better what you want to achieve when you ask others for help):

< Blockquote>

The consultant can not get the on-home device of the plot

It is something that should be a client side, that is, in the browser. Therefore, it is a function for javascript code implemented by the browser in the context of your website. Therefore, if you are forcing Javascript to be used anyway, then perhaps the client (browser) only allows one of several javascript to create data and plot conspiracy to plot the plot of intersections. This way, you save some loads on the server (matlotib is actually a very white CPU) and saves bandwidth too.

You may want to see.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -