Maybe some way to plot a monthly calendar?
Just looking to be able to pull up a monthly calendar on
my living room display screen./control page.
Thanks,
Carl
#! /usr/bin/env python2.6
# -*- coding: utf-8 -*-
import calendar
from datetime import datetime, time
import matplotlib.pyplot as plt
font_name = 'Andale Mono'
font_color = '#000000'
year = int(datetime.today().strftime('%Y'))
month = int(datetime.today().strftime('%m'))
cal = calendar.month(year, month)
output_file_path = '/Library/Application Support/Perceptive Automation/Indigo 6/IndigoWebServer/images/controls/static/calendar.png'
fig = plt.figure(figsize=(5, 3))
ax = fig.add_subplot(111)
ax.text(0.07, 0.95, cal, transform=ax.transAxes, color=font_color, fontname=font_name, fontsize=20, verticalalignment='top')
ax.axes.get_xaxis().set_visible(False)
ax.axes.get_yaxis().set_visible(False)
# ax.axis('off') # uncomment this line to hide the box
plt.savefig(output_file_path, transparent=True)
ckeyes888 wrote:Looks great! Thing is it wants a mathplotlib installed. I'm running 10.6.8. I see the install for it uses Python 2.7,
Do you think installing mathplotlib will work?
Thanks,
Carl
pip-2.6 install matplotlib
pip2.6 install matplotlib
ckeyes888 wrote:Now the error is: no module named mathplotlib.pyplot
Maybe called something else?
Thanks,
Carl
Looks great! Thing is it wants a mathplotlib installed. I'm running 10.6.8. I see the install for it uses Python 2.7,
Do you think installing mathplotlib will work?
Users browsing this forum: No registered users and 1 guest