Skip to content

Inconsistent Cycling Behavior in ProPlot's Cycler Implementation #25

Closed

Description

@cvanelteren

Currently, ProPlot's internal implementation of cycling functionality exhibits inconsistent behavior. While ProPlot uses a custom function to maintain compatibility with Matplotlib's cycler API, there appears to be a discrepancy in how cycling is executed.

Specifically:

  1. The plotting functions are correctly implementing manual cycling
  2. However, the underlying cycle object itself is not properly advancing through its sequence

This creates a mismatch between the expected cycling behavior and the actual output, potentially affecting any functionality that relies on proper cycler state management.

Steps to reproduce:

import ultraplot as plt
import numpy as np
state = np.random.RandomState(51423)
fig, ax = plt.subplots()
cmap = plt.colormaps.get_cmap("538")
cycle = plt.Cycle(
    "538",
    marker=["X", "o", "s", "d"],
    sizes=[20, 100],
    edgecolors=["r", "k"]
)
ax.scatter(
    state.rand(10, 4),
    state.rand(10, 4),
    cycle=cycle,
    area_size=False,
)
plt.show(block = 1)

Image
Expected behavior:
The cycle object should advance through its sequence in sync with the plotting functions.

Current behavior:
While plotting functions manually cycle through values, the cycle object remains static and doesn't progress through its sequence as expected.

Activity

  1. cvanelteren commented on Jan 18, 2025

    @cvanelteren
    CollaboratorAuthor

    Note here the colors are cycling but none of the other properties are.

  2. cvanelteren commented on Jan 18, 2025

    @cvanelteren
    CollaboratorAuthor

    Image

  3. cvanelteren commented on Jan 18, 2025

    @cvanelteren
    CollaboratorAuthor

    Got it working on the PR 😄

  4. cvanelteren commented on Jan 26, 2025

    @cvanelteren
    CollaboratorAuthor

    Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions