keynoob.blogg.se

Geektool themes
Geektool themes







Two geeklets are needed: one that runs the script and another that displays the resulting plot.

geektool themes

The plot is saved to my Pictures folder, instead of wherever directory the script happens to be run from.The x-axis is marked with clock times instead of “minutes from now.”.They seemed too busy for a Desktop graphic and unnecessary for a plot I’ll be looking at every day. I got rid of the title, the x-axis label, and the y-axis interval descriptors.This matches the style of my other geeklets and means the plot will work on any dark Desktop color or pattern. The plot has a transparent background, and all the colors have been changed to white with varying alpha values.The number of standard deviations for the IQR are precalculated and hard-coded into the script. The limits aren’t calculated via the SciPy stats library.The confidence interval has change from a 95% to the IQR.Very little of the script has changed from the original. Here’s the script that produces the plot: python:ĩ: from datetime import datetime, timedeltaġ2: plotfile = environ + '/Pictures/ds-rain.png'ġ4: # The list of times on the x axis, 10 minutes apart.ġ7: plotlabels = ĥ8: upper = + x/3*nUpper, 75) for x in weather ]ĥ9: lower = + x/3*nLower, 0) for x in weather ]Ħ0: time = - startTime)/60 for x in weather ]Ħ3: plt.fill_between(,, , color='#ffffff', alpha=.01, linewidth=0)Ħ4: plt.fill_between(,, , color='#ffffff', alpha=.02, linewidth=0)Ħ5: plt.fill_between(,, , color='#ffffff', alpha=.04, linewidth=0)Ħ6: plt.fill_between(,, , color='#ffffff', alpha=.08, linewidth=0)Ħ9: plt.plot(time, intensity, color='#ffffff', linewidth=3)ħ0: plt.fill_between(time, upper, lower, color='#ffffff', alpha=.05, linewidth=0)ħ3: plt.xticks(plotminutes, plotlabels, color='#ffffff')ħ5: plt.tick_params('y', length=0, color='#ffffff')ħ6: plt.tick_params('x', color='#ffffff')ħ8: plt.savefig(plotfile, dpi=50, transparent=True, bbox_inches='tight') The horizontal gradations represent increasing rain intensity, the solid white line is the mean predicted intensity, and the faint band around it is the interquartile range (IQR). Here’s what the plot looks like on my Desktop, which is the Solid Aqua Dark Blue color that OS X has had for years as one of its standard solid Desktop colors. I think Tynsoe has fixed GeekTool’s memory problem, but I’ll be keeping an eye on it. This was not something I wanted for my Dark Sky plot, so I switched back.

geektool themes geektool themes

Recently, though, I learned that NerdTool can’t display a PNG image as is-it always scales the image, even when you tell it not to. Since this was a much better use of the script than I had ever put it to, I stole some of their ideas and made my own geeklet.įor years I’ve been putting textual weather information and a radar image on my Desktop via NerdTool, a GeekTool workalike that I switched to when I found GeekTool eating up a lot of RAM. Shortly after my post on combining the Dark Sky API with the Python matplotlib library to create rain intensity plots with confidence intervals, Jay Hickey and Barron Bichon both decided they wanted plots like that on their Desktops, so each of them adapted my script and turned it into GeekTool geeklet. Next post Previous post Dark Sky plot for GeekTool









Geektool themes