MCPcopy Create free account
hub / github.com/emilk/egui_plot / hline

Method hline

egui_plot/src/plot.rs:2093–2098  ·  view source on GitHub ↗

Add a horizontal line. Can be useful e.g. to show min/max bounds or similar. Always fills the full width of the plot.

(&mut self, mut hline: crate::HLine)

Source from the content-addressed store, hash-verified

2091 /// Can be useful e.g. to show min/max bounds or similar.
2092 /// Always fills the full width of the plot.
2093 pub fn hline(&mut self, mut hline: crate::HLine) {
2094 if hline.stroke.color == Color32::TRANSPARENT {
2095 hline.stroke.color = self.auto_color();
2096 }
2097 self.items.push(Box::new(hline));
2098 }
2099
2100 /// Add a vertical line.
2101 /// Can be useful e.g. to show min/max bounds or similar.

Callers 1

show_plotMethod · 0.80

Calls 1

auto_colorMethod · 0.80

Tested by

no test coverage detected