1. All the set calls should be setp calls

So:
    set(gca(), 'xticks', [1,2,3,4])

should be:

from pylab import *
    setp(gca(), 'xticks', [1,2,3,4])

2. Question:
"Can I just generate images without having a window popup?"

HTML markup is bad, so I get this in my browser
href=backends.html#Cairo>Cairo

Here goes the patch (first one ever :))
--- faq.html.template   2006-06-05 01:33:45.531250000 +0200
+++ faq.html.template.new       2006-06-05 01:37:15.203125000 +0200
@@ -747,7 +747,7 @@
      'Can I just generate images without having a window popup?',
      """
 The easiest way to do this is use an image backend, either <a
-href=backends.html#Agg>Agg</a>, href=backends.html#Cairo>Cairo</a>, <a
+href=backends.html#Agg>Agg</a>, <a href=backends.html#Cairo>Cairo</a>, <a
 href=backends.html#GD>GD</a> or <a href=backends.html#Paint>Paint</a>
 if you want to generate PNG images, eg, for use in a web page, or PS
 if you want publication quality, scalable images.  All of these
@@ -858,7 +858,7 @@

 <pre>
 locs, labels = xticks()
-set(labels, fontsize=8)
+setp(labels, fontsize=8)
 </pre>

 You can also set the default ticklabel size in your <a
@@ -901,10 +901,10 @@
 <pre>
     from pylab import *
     plot([1,2,3,4], [1,4,9,16])
-    set(gca(), 'xticks', [1,2,3,4])
-    labels = set(gca(), 'xticklabels',
+    setp(gca(), 'xticks', [1,2,3,4])
+    labels = setp(gca(), 'xticklabels',
           ['Frogs', 'Hogs', 'Bogs', 'Slogs'])
-    set(labels, 'rotation', 'vertical')
+    setp(labels, 'rotation', 'vertical')
     show()
 </pre>
 """),


_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to