script1

** Ejemplos de codigo fuente: ** § // #!/usr/bin/env python // § // # -*- noplot -*- // § // """ // § // A pure OO (look Ma, no pylab!) example using the agg backend // § // """ // § ** from ** ** matplotlib.backends.backend_agg ** ** import ** FigureCanvasAgg ** as ** FigureCanvas § ** from ** ** matplotlib.figure ** ** import ** Figure § § fig = Figure § canvas = FigureCanvas(fig) § ax = fig. add_subplot( 111 ) § ax. plot([ 1, 2 , 3 ]) § ax. set_title( 'hi mom' ) § ax. grid( True ) § ax. set_xlabel( 'time' ) § ax. set_ylabel( 'volts' ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ canvas. print_figure( 'test' ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ // """ // <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ // Illustrate the API for changing the cycle of colors used // <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ // when plotting multiple lines on a single Axes. // <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ // """ // <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ** import ** ** numpy ** ** as ** ** np ** <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ** import ** ** matplotlib.pyplot ** ** as ** ** plt ** <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ** import ** ** matplotlib ** ** as ** ** mpl ** <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ yy = np. arange( 24 ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ yy. shape = 6, 4 <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ mpl. rc( 'lines', linewidth = 4 ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ fig = plt. figure <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ mpl. axes. set_default_color_cycle([ 'r', 'g' , 'b' , 'c' ]) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax = fig. add_subplot( 2, 1 , 1 ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax. plot(yy) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax. set_title( 'Changed default color cycle to rgbc' ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax = fig. add_subplot( 2, 1 , 2 ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax. set_color_cycle([ 'c', 'm' , 'y' , 'k' ]) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax. plot(yy) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ ax. set_title( 'This axes only, cycle is cmyk' ) <span style="color: black; font-family: Wingdings; font-size: 12pt; letter-spacing: 0.2pt; line-height: 120%;">§ plt. show § ** Ejemplos **** gráficos **** : ** Ver aplicaciones ** (ingresa a esta pagina)
 * Ejemplos Del modulo **

http://matplotlib.sourceforge.net/users/screenshots.html

** Regresar --> **