Another possibility -- this one was designed for a dimmer.
Any interest?
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import matplotlib.patches as patches
fig = plt.figure(1, figsize=(.5,.5), dpi=200)
ax = fig.add_subplot(111, axisbg='#FFFFFF')
level = 60
on = True
k_dict = {'bbox_extra_artists': None, 'bbox_inches': None, 'format': None, 'frameon': None, 'orientation': None, 'pad_inches': None,
'papertype': None, 'transparent': True}
if on:
colors = ['#000000','#0000FF']
else:
colors = ['#000000','#333333']
wedges, texts = ax.pie([100-level, level], colors=colors, startangle=90)
wedges[1].set_edgecolor('#000000')
inner_circle = plt.Circle((0,0), .65, facecolor="#000000", edgecolor='#777777', lw=.25)
ax.add_artist(inner_circle)
outer_circle = plt.Circle((0,0), 1, facecolor=None, edgecolor='#777777', fill=False, alpha=1, lw=.25)
ax.add_artist(outer_circle)
plt.subplots_adjust(left=0, bottom=0, right=1, top=1, wspace=0, hspace=0)
plt.savefig('/Users/USERNAME/Desktop/figure_on1.png', dpi=200, **k_dict)
Users browsing this forum: No registered users and 8 guests