Updating Figure Display in Jupyter
Hello /r/IPython
​
I'm not sure if this is the right place to ask this, but the jupyter subreddit doesn't seem very active. Anywho, I'm trying grabbing images from webcam and doing some processing on it, and I want the output from the code block to update, maybe redrawing the figure/axis so that the newer image shows. Here's what I have:
```
plt.ion()
webcam = init_cam() #sets resolution and stuff
fig, ax = plt.subplots(1)
axim = ax.imshow(tFrame) #Show some pre-grabbed image
while True:
frame = get(webcam) #gets image from webcam
axim.set_data(frame)
plt.show(block=False)
#plt.pause(1) #I've tried with and without pauses
```
And long story short, it doesn't update the figure and appears to only show the first frame. Am I doing something wrong? Is there another way to do this? Any help would be appreciated!
/r/IPython
https://redd.it/k8a6nx
Hello /r/IPython
​
I'm not sure if this is the right place to ask this, but the jupyter subreddit doesn't seem very active. Anywho, I'm trying grabbing images from webcam and doing some processing on it, and I want the output from the code block to update, maybe redrawing the figure/axis so that the newer image shows. Here's what I have:
```
plt.ion()
webcam = init_cam() #sets resolution and stuff
fig, ax = plt.subplots(1)
axim = ax.imshow(tFrame) #Show some pre-grabbed image
while True:
frame = get(webcam) #gets image from webcam
axim.set_data(frame)
plt.show(block=False)
#plt.pause(1) #I've tried with and without pauses
```
And long story short, it doesn't update the figure and appears to only show the first frame. Am I doing something wrong? Is there another way to do this? Any help would be appreciated!
/r/IPython
https://redd.it/k8a6nx
reddit
Updating Figure Display in Jupyter
Hello /r/IPython I'm not sure if this is the right place to ask this, but the jupyter subreddit doesn't seem very active. Anywho, I'm...
Trying to Customize HTML tables
I'm not sure if this would be more of an HTML question but I figured it would make sense to go here because I already figured out what to do on the html end. Basically I want a table where I can hover over each individual cell and a popup appears. The issue I'm having is that I'm using bootstrap and I'm not sure how I could modify the table to include popups or if anyone has a suggestion of a different tool I could use.
This is my code here, it's very simply it just gets a pandas dataframe of strings from another file which gets converted into a bootstrap table and displays it using flask.
app = Flask(name)
@app.route('/')
def index():
#Gets a dataframe of strings from another file
map = main()
# Convert the DataFrame to an HTML table
tablehtml = map.tohtml(classes='table table-bordered table-hover')
/r/flask
https://redd.it/1702a5j
I'm not sure if this would be more of an HTML question but I figured it would make sense to go here because I already figured out what to do on the html end. Basically I want a table where I can hover over each individual cell and a popup appears. The issue I'm having is that I'm using bootstrap and I'm not sure how I could modify the table to include popups or if anyone has a suggestion of a different tool I could use.
This is my code here, it's very simply it just gets a pandas dataframe of strings from another file which gets converted into a bootstrap table and displays it using flask.
app = Flask(name)
@app.route('/')
def index():
#Gets a dataframe of strings from another file
map = main()
# Convert the DataFrame to an HTML table
tablehtml = map.tohtml(classes='table table-bordered table-hover')
/r/flask
https://redd.it/1702a5j
Reddit
From the flask community on Reddit
Explore this post and more from the flask community