0

I would like to create a Plotlars TimeSeriesPlot for 2 time series that have completely different value range. Hence a secondary y-axis would be great for readability (as of now I just see 2 parallel lines).

But I somehow don't get it to work. There is no pointer in the Plotlars documentation either.

This is the code so far:

use plotlars::{TimeSeriesPlot, Plot};

let df = DataFrame::empty();  // Replace with something more meaningful

TimeSeriesPlot::builder()
   .data(&df)
   .x("our_ts")
   .y("basis_spread")
   .additional_series(vec!["cons_bid"])  // <--- What is missing here to create a 2nd y-axis ?
   .build()
   .write_html("/tmp/line_and_scatter_plot.html");

1 Answer 1

0

I’m the maintainer of Plotlars.

Good news—starting with Plotlars 0.9.0 (just released!) you can add a secondary y-axis to any cartesian plot.

Sign up to request clarification or add additional context in comments.

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.