Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

For the DualCoordChartContext add borrow_secondary_mut function #704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bennysj wants to merge 1 commit into plotters-rs:master
base: master
Choose a base branch
Loading
from bennysj:dual_mut_fix

Conversation

@bennysj
Copy link

@bennysj bennysj commented Oct 24, 2025

The function borrow_secondary function does not return a mutable reference. It would be useful if it actually would be possible to get a &mut reference to the secondary context.
Implement a new function that actually return a &mut reference to the secondary context.

For example to write a generic draw function:

 fn draw_chart_series<DB>(
 chart: &mut ChartContext<'_, DB, Cartesian2d<RangedCoordf32, RangedCoordf32>>,
 data_series: &ModelRc<XYData>,
 ) where
 DB: DrawingBackend,
 {
 // draw the chart series for both primary and secondary
 }

nielsle reacted with thumbs up emoji
The function borrow_secondary function does not return a mutable
reference. It would be useful if it actually would be possible
to get a &mut reference to the secondary context.
Implement a new function that actually return a &mut reference
to the secondary context.
Copy link

nielsle commented Dec 7, 2025

This looks useful.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /