Commit Graph

100 Commits

Author SHA1 Message Date
Tom Keffer
0d30285c9b Fix deprecated constant ImageFont.LAYOUT_BASIC
`ImageFont.LAYOUT_BASIC`, was removed in Pillow v10.0, and
replaced with `ImageFont.Layout.BASIC`.
2023-07-02 08:56:26 -07:00
Tom Keffer
9bf85d18e3 Merge branch 'development' into V5 2023-04-03 18:54:56 -07:00
Tom Keffer
48f6053acf Put coordinates in proper order for drawing a rectangle.
Fixes issue #862.
2023-04-03 18:54:28 -07:00
Tom Keffer
cd9003dd6c Activate workaround for earlier versions of Pillow.
Without the workaround, you can get a segmentation fault.
See https://github.com/python-pillow/Pillow/issues/3066
2023-02-21 15:09:29 -08:00
Tom Keffer
5f9630cd29 Activate workaround for older versions of Pillow
Relax Pillow dependency to >=7.2.

Have genplot.py assume unicode strings.

Remove function weeutil.weeutil.to_text()
2023-02-14 16:29:35 -08:00
Tom Keffer
eddd71d5f1 Modernize utilities.
Now Python 3 only.
2023-02-14 15:33:26 -08:00
Tom Keffer
dc4ab54b9a Replace references to ImageDraw.textsize().
Method `ImageDraw.textsize()` was deprecated in Pillow 9.2 (1-Jul-2022),
and will be removed in Pillow 10.0 (due 1-Jul-2023). Replace it with
workaround methods.
2023-02-02 07:54:41 -08:00
Tom Keffer
a38d857465 Allow line_gap_fraction to be used with bar plots.
Fixes issue #818.
2023-01-27 05:22:45 -08:00
Tom Keffer
00ad02f392 Fixed doctests in utilities.py. 2021-11-04 11:06:28 -07:00
Tom Keffer
5140cedf07 X-axis for time series plots must always be in unix epoch time. 2021-04-16 13:53:11 -07:00
Tom Keffer
e51b2a63a5 Fixed problem where unit labels would not render correctly under Python 2.7 if
they were set by a 3rd party extension. Fixes issue #662.
2021-04-08 07:37:48 -07:00
Tom Keffer
53e9690a71 Minor refactoring. 2021-04-07 12:56:16 -07:00
Tom Keffer
f2b20931cb Plots longer than 2 years use a 6 month time increment. 2021-02-12 14:07:15 -08:00
Tom Keffer
1f7790d46c A time scale of two years should use a time increment of one month. 2021-02-10 07:35:25 -08:00
Tom Keffer
8f54e26646 Fixed problem with running running test suites under Python 2. 2021-01-29 15:49:46 -08:00
Tom Keffer
bf4da5b73e Fixed problem where plots could fail if the data range was outside of a specified axes range.
Fixes issue #638.
2021-01-15 09:50:12 -08:00
Tom Keffer
38502bf5a9 locale.format() has been deprecated. Use locale.format_string() instead 2020-12-14 16:51:29 -08:00
Brent Fraser
35cc238364 add ability to select the y-axis to label (#610)
* add ability to select the y-axis to label

* added note re ability to select the y-axis to label
2020-09-28 05:38:38 -07:00
gjr80
533dedc43a Fix test suite scale() error 2020-08-05 22:31:24 +10:00
gjr80
8d7a5abd03 Fix yaxis plot scaling (#567)
* Fix corner case where scale() returned unusable results when fmn==fmx and a non-None minscale is specified

* python3ise doctests

* doctest typo

* Added one more doctest

* Added tests for modified scale()

* Update change history
2020-06-27 14:52:22 -07:00
tkeffer@gmail.com
34f32810ff Convert fontpath to str before trying to load it. 2020-01-11 05:16:01 -07:00
tkeffer@gmail.com
b2ae5176d1 Got rid of unnecessary assertions. 2019-12-16 17:06:12 -07:00
Tom Keffer
98bde92048 Check for condition where both min and max are zero.
Fixes issue #463
2019-10-28 08:40:34 -07:00
Alex Edwards
2f052321d4 Fixed and improved blend() function for day/night colouration.
* Uses shortest travel distance around colour wheel to minimize extra colours in blend.
* Detects grey colours to minimize travel around HSL colour wheel
* Fixes math to use 255.0 rather than 256.0
2019-10-24 11:05:18 +13:00
Tom Keffer
77480391d0 Changed name of test subdirectory from 'test' to 'tests'. 2019-03-02 17:26:05 -08:00
Tom Keffer
0728b54c6b Use native 'range', instead of compatibility shim. 2019-02-24 06:01:25 -08:00
Tom Keffer
1037aa5292 Reverted name back to _rel_approx_equal 2019-02-14 06:35:55 -08:00
Tom Keffer
01db79d31a Created unittests for weeplot.utilities 2019-02-14 06:23:36 -08:00
Tom Keffer
688a8427bb Machine translated bin/weeplot using python-modernize 2019-02-12 18:36:10 -08:00
Tom Keffer
6c98ce4e86 Changed xrange() to range() 2019-02-09 15:04:00 -08:00
Tom Keffer
8e47104a4e More literal unicode strings 2019-02-09 14:16:19 -08:00
Tom Keffer
c11431aff9 Check point 2019-02-09 11:33:58 -08:00
Tom Keffer
8e2d07ac56 When reading ConfigObj from a file, decode from utf-8 2019-02-07 10:20:19 -08:00
Tom Keffer
0b380dcc59 Simplify path logic slightly 2019-02-06 05:23:40 -08:00
Matthew Wall
d55089ce07 do not normalize path if path is None 2019-02-05 20:54:41 -05:00
Tom Keffer
ecac2a7823 Catch up merge of branch 'development' into newskin
# Conflicts (all resolved):
#	bin/weecfg/__init__.py
#	bin/weecfg/test/expected/weewx_user_expected.conf
#	bin/weewx/reportengine.py
#	docs/changes.txt
2018-10-07 06:38:27 -07:00
Tom Keffer
3e516ab944 Fixed bug that caused divide-by-zero error in plots. Issue #344. 2018-09-27 05:49:58 -07:00
Tom Keffer
a6c96c9680 More robust formatting for the tests 2018-09-25 05:40:53 -07:00
Tom Keffer
451aa5f960 corrected comment 2018-09-25 05:24:34 -07:00
Matthew Wall
937936abfd merge master 2018-06-16 08:23:56 -04:00
Tom Keffer
b157af03c9 Merge remote-tracking branch 'remotes/origin/master' into development
# Conflicts:
#	docs/changes.txt
2018-06-16 05:16:23 -07:00
Tom Keffer
54426d78b0 Added definitions for missing attributes 2018-04-17 04:33:30 -07:00
Tom Keffer
f4385cab13 Fixed typo. s/rose_line_widght/rose_line_width/ 2018-01-17 18:29:35 -07:00
Tom Keffer
5206fb3f7a Rose line width can now be specified with option rose_line_width 2018-01-17 17:39:37 -07:00
Matthew Wall
22e20445a0 Merge branch 'development' into newskin 2017-04-28 10:29:06 -04:00
Tom Keffer
4c391325a8 Fixed bug that could cause tick crowding when hardwiring y-axis min and
max values.
2017-04-17 10:06:00 -07:00
Tom Keffer
e59d57ec1b The nominal number of ticks on the y-axis can now be specified using option y_nticks. 2017-03-25 08:17:37 -07:00
Tom Keffer
eddd084835 Correct one test case. Added a couple more tests. 2017-03-24 16:22:17 -07:00
Tom Keffer
2bbe581f08 Fill colors can now be specified. Fixes issue #227. 2017-03-11 12:54:32 -08:00
Paolo
f478b6be05 Update genplot.py 2017-03-11 14:10:46 +01:00