Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (25)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (6542)

  • Revision 9cca649a959fe035f52b3eacc5a3555e784d1a46 : report de [15660] : addcslashes au lieu de addslashes git-svn-id : ...

    30 avril 2010, par Cerdic — Log

    report de [15660] : addcslashes au lieu de addslashes git-svn-id : svn ://trac.rezo.net/spip/branches/spip-2.0@15661 caf5f3e8-d4fe-0310-bb3e-c32d5e47d55d

  • Revision 84e62427eb0dbdf3692f746d4848770f6be6b76f : liens_implicite.. au lieu de lien_implicite..., et on evacue le site qui ...

    25 septembre 2010, par Cerdic — Log

    liens_implicite.. au lieu de lien_implicite..., et on evacue le site qui part dans l’extension correspondante git-svn-id : svn ://trac.rezo.net/spip/spip@16308 caf5f3e8-d4fe-0310-bb3e-c32d5e47d55d

  • Matplotlib use Ffmpeg to save plot to be mp4 not include full step

    21 décembre 2020, par 昌翰余

    I use ffmpeg to store the dynamic graph drawn on matplotlib, but the output file is only 2 seconds
but It should have been 30 seconds.
I set a graph to run three curves, a total of 30 seconds of data,
the graph that ran on the py file is normal,
but the output is only the first two seconds of the output.
May I ask if I missed something

    


    Below is my code

    


    import matplotlib.pyplot as plt
from matplotlib import animation
from numpy import random 
import pandas as pd
from matplotlib.animation import FFMpegWriter

FFwriter=animation.FFMpegWriter(fps=30, extra_args=['-vcodec', 'libx264'])
data = pd.read_csv('apple1.csv', delimiter = ',', dtype = None)
data = data.values
AccX1=[]
AccY1=[]
AccZ1=[]
AccX2=[]
AccY2=[]
AccZ2=[]

time = []

for i in range(600):
        AccX1.append(data[i][8])
        AccY1.append(data[i][9])
        AccZ1.append(data[i][10])
        AccX2.append(data[i][24])
        AccY2.append(data[i][25])
        AccZ2.append(data[i][26])
        
        time.append(data[i][0])
        
fig = plt.figure()
ax1 = plt.axes(xlim=(0,3000), ylim=(6,-6))
line, = ax1.plot([], [], lw=2)
plt.xlabel('ACC')
plt.ylabel('Time')

plotlays, plotcols = [3], ["r","g","b"]
lines = []
for index in range(3):
    lobj = ax1.plot([],[],lw=2,color=plotcols[index])[0]
    lines.append(lobj)


def init():
    for line in lines:
        line.set_data([],[])
    return lines

x1,y1 = [],[]
x2,y2 = [],[]
x3,y3 = [],[]



i=0

def animate(frame):
    global i
    
    i+=1
    x = i
    y = AccX1[i]

    x1.append(x)
    y1.append(y)

    x = i
    y = AccY1[i]
    x2.append(x)
    y2.append(y)

    x = i
    y = AccZ1[i]
    x3.append(x)
    y3.append(y)
    

    xlist = [x1, x2,x3]
    ylist = [y1, y2,y3]


    for lnum,line in enumerate(lines):
        line.set_data(xlist[lnum], ylist[lnum]) 


    return lines


anim = animation.FuncAnimation(fig, animate,
                    init_func=init, blit=True,interval=10)
anim.save('test.mp4',writer=FFwriter)
plt.show()


    


    The dynamic picture ran out using plt.show is correct.
And I don't think I have set the length of storage. Did I add something ?