Feature Request: Line Colors for Cartesian Plot Lines

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start by inspecting the Cartesian component and its current line-rendering API, using the issue's Fitbit example to understand the requested behavior. Determine how a line color can depend on its y-axis value, then verify that the Cartesian plot supports the requested color customization and that existing plotting behavior remains intact.

Written by the indexing model from the issue text.

Description

enhancement

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.

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

screenshot2

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

Dominant language
Python
Stars
13
Forks
16
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adafruit/Adafruit_CircuitPython_DisplayIO_Layout

All issues in adafruit/Adafruit_CircuitPython_DisplayIO_Layout

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.