-
Notifications
You must be signed in to change notification settings - Fork 107
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
Resolve #184 #218
base: main
Are you sure you want to change the base?
Resolve #184 #218
Conversation
I will review it this week. Sorry for the delay. |
It still needs to be finished. I made the PR to show my approach. I was thinking of creating some builders to avoid cumbersome code like writing the whole |
I found in fn many_subplots_with_titles() {
let trace1 = Scatter::new(vec![1, 2], vec![4, 5]);
let number_of_plots = 10;
let mut plot = Plot::new();
let mut layout = Layout::new()
.grid(
LayoutGrid::new()
.rows(number_of_plots / 2)
.columns(2)
.pattern(GridPattern::Independent),
)
.height(number_of_plots * 200);
for i in 1..number_of_plots + 1 {
plot.add_trace(
trace1
.clone()
.y_axis(format!("y{}", i))
.x_axis(format!("x{}", i)),
);
layout.add_annotation(
Annotation::new()
.y_ref(format!("y{} domain", i))
.y_anchor(Anchor::Bottom)
.y(1)
.text(format!("Title {}", i))
.x_ref(format!("x{} domain", i))
.x_anchor(Anchor::Center)
.x(0.5)
.show_arrow(false),
)
}
plot.set_layout(layout);
plot.set_configuration(Configuration::new().responsive(true));
plot.show();
} However, I still think the current changes can be useful since these new changes are handling another path. But I wanted to mention it |
@yasuomaidana . I didn't manage to properly review your PR and I won't be in the next 2 weeks either. Will be back on it at end of August. In general, it looks good. Indeed, I would prefer if we can abstract calls like these |
I agree with you; I considered adding |
612f5f7
to
73657bd
Compare
Sorry, men, I was busy, but I back on this issue, I'll work on it this week |
# Conflicts: # plotly/src/layout/mod.rs
Sorry @yasuomaidana , I was also quite busy. I will have a look at your proposal in the next 2-3 weeks. |
Here, you can see the current changes related to plotting multiple axes. The test had passed, but I had to update the examples and check the functionality.