@@ -489,130 +489,12 @@ def generate_example_rst(app):
489489
490490
491491 <style type="text/css">
492-
493492 div#sidebarbutton {
494493 display: none;
495494 }
496-
497- .figure {
498- float: left;
499- margin: 10px;
500- -webkit-border-radius: 10px; /* Saf3-4, iOS 1-3.2, Android <1.6 */
501- -moz-border-radius: 10px; /* FF1-3.6 */
502- border-radius: 10px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */
503- border: 2px solid #fff;
504- background-color: white;
505- /* --> Thumbnail image size */
506- width: 150px;
507- height: 100px;
508- -webkit-background-size: 150px 100px; /* Saf3-4 */
509- -moz-background-size: 150px 100px; /* FF3.6 */
510- }
511-
512- .figure img {
513- display: inline;
514- }
515-
516- div.docstringWrapper p.caption {
517- display: block;
518- -webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.0);
519- -moz-box-shadow: 0px 0px 20px rgba(0, 0, 0, .0); /* FF3.5 - 3.6 */
520- box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.0); /* Opera 10.5, IE9, FF4+, Chrome 10+ */
521- padding: 0px;
522- border: white;
523- }
524-
525- div.docstringWrapper p {
526- display: none;
527- background-color: white;
528- -webkit-box-shadow: 0px 0px 20px rgba(0, 0, 0, 1.00);
529- -moz-box-shadow: 0px 0px 20px rgba(0, 0, 0, 1.00); /* FF3.5 - 3.6 */
530- box-shadow: 0px 0px 20px rgba(0, 0, 0, 1.00); /* Opera 10.5, IE9, FF4+, Chrome 10+ */
531- padding: 13px;
532- margin-top: 0px;
533- border-style: solid;
534- border-width: 1px;
535- }
536-
537-
538495 </style>
539496
540497
541- .. raw:: html
542-
543-
544- <script type="text/javascript">
545-
546- function animateClone(e){
547- var position;
548- position = $(this).position();
549- var clone = $(this).closest('.thumbnailContainer').find('.clonedItem');
550- var clone_fig = clone.find('.figure');
551- clone.css("left", position.left - 70).css("top", position.top - 70).css("position", "absolute").css("z-index", 1000).css("background-color", "white");
552-
553- var cloneImg = clone_fig.find('img');
554-
555- clone.show();
556- clone.animate({
557- height: "270px",
558- width: "320px"
559- }, 0
560- );
561- cloneImg.css({
562- 'max-height': "200px",
563- 'max-width': "280px"
564- });
565- cloneImg.animate({
566- height: "200px",
567- width: "280px"
568- }, 0
569- );
570- clone_fig.css({
571- 'margin-top': '20px',
572- });
573- clone_fig.show();
574- clone.find('p').css("display", "block");
575- clone_fig.css({
576- height: "240",
577- width: "305px"
578- });
579- cloneP_height = clone.find('p.caption').height();
580- clone_fig.animate({
581- height: (200 + cloneP_height)
582- }, 0
583- );
584-
585- clone.bind("mouseleave", function(e){
586- clone.animate({
587- height: "100px",
588- width: "150px"
589- }, 10, function(){$(this).hide();});
590- clone_fig.animate({
591- height: "100px",
592- width: "150px"
593- }, 10, function(){$(this).hide();});
594- });
595- } //end animateClone()
596-
597-
598- $(window).load(function () {
599- $(".figure").css("z-index", 1);
600-
601- $(".docstringWrapper").each(function(i, obj){
602- var clone;
603- var $obj = $(obj);
604- clone = $obj.clone();
605- clone.addClass("clonedItem");
606- clone.appendTo($obj.closest(".thumbnailContainer"));
607- clone.hide();
608- $obj.bind("mouseenter", animateClone);
609- }); // end each
610- }); // end
611-
612- </script>
613-
614-
615-
616498Examples
617499========
618500
@@ -969,13 +851,13 @@ def generate_file_rst(fname, target_dir, src_dir, root_dir, plot_gallery):
969851 # incrementally: 1, 2, 3 and not 1, 2, 5)
970852 # * iterate over [fig_mngr.num for fig_mngr in
971853 # matplotlib._pylab_helpers.Gcf.get_all_fig_managers()]
972- for fig_num in ( fig_mngr . num for fig_mngr in
973- matplotlib . _pylab_helpers . Gcf . get_all_fig_managers ()) :
854+ fig_managers = matplotlib . _pylab_helpers . Gcf . get_all_fig_managers ()
855+ for fig_mngr in fig_mngr :
974856 # Set the fig_num figure as the current figure as we can't
975857 # save a figure that's not the current figure.
976- plt .figure (fig_num )
977- plt .savefig (image_path % fig_num )
978- figure_list .append (image_fname % fig_num )
858+ plt .figure (fig_mngr . num )
859+ plt .savefig (image_path % fig_mngr . num )
860+ figure_list .append (image_fname % fig_mngr . num )
979861 except :
980862 print (80 * '_' )
981863 print ('%s is not compiling:' % fname )
0 commit comments