1. James Morrison
  2. Waverose


James Morrison  committed a56b92f

specify dpi=300 on savefig command

set defauly xy specific legend position in windrose

  • Participants
  • Parent commits e9bbafe
  • Branches default

Comments (0)

Files changed (2)

File waverose.py

View file
         return ax, fig
     def set_legend(self, ax, y_label):
-        l = ax.legend(axespad=-0.10, title=y_label, loc = 'lower right')
+        l = ax.legend(axespad=-0.10, title=y_label)
         l.title = 'Hm0 in metres'
         plt.setp(l.get_texts(), fontsize=8)
         #windrose like a stacked histogram with normed (displayed in percent) results
         ax, fig = self.new_axes()
         ax.bar(wd, sig_wave_height, normed=True, opening=1, edgecolor='white', bins=self.bin_values, nsector=32)
-        ax.set_title( title + "\n Radial values indicate percentage of occurences")
-        self.set_legend(ax, y_label)
+        ax.set_title( title + "\n Radial values indicate percentage of occurences") 
         tick_range = range(0,self.ylim,self.interval)
-        plt.savefig( title + ".png")
+        self.set_legend(ax, y_label)
+        plt.savefig( title, dpi=300)

File windrose.py

View file
-    def legend(self, loc='lower right', **kwargs):
+    def legend(self, loc=(0.75,0), **kwargs):
         Sets the legend location and her properties.
         The location codes are