adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_Layout

Feature Request: Line Colors for Cartesian Plot Lines

Open
#86 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
13
Forks
16
PR merge metrics
No merged PRs in 30d

Description

As far as I can tell there's no parameter for changing the line color with cartesian. Would like to change it depending on y-axis value.
[Here's my current code for the fitbit api project. ](https://github.com/DJDevon3/My_Circuit_Python_Projects/blob/main/Boards/espressif/Unexpected%20Maker%20Feather%20S3/3.5%20TFT%20Featherwing/Fitbit%20API%20Graph/code.py)

```py
my_plane = Cartesian(
x=30, # x position for the plane
y=60, # y plane position
width=DISPLAY_WIDTH-20, # display width
height=DISPLAY_HEIGHT-80, # display height
xrange=(0, 14), # x range
yrange=(lowest_y[0], highest_y[0]), # y range
axes_color=bar_color(highest_y[0]),
pointer_color=TEXT_PINK,
axes_stroke=4,
major_tick_stroke=2,
subticks=True,
)
```

![screenshot1](https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout/assets/49322231/baaf7f9b-c025-4369-bf61-4df6c498ef5a)

![screenshot2](https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_Layout/assets/49322231/c6bce39f-bac3-440b-9e02-c814b2108f38)

Only thing I can currently colorize is the axes depending on value.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.