mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
Add some vertical spacing
This commit is contained in:
@@ -13,6 +13,7 @@ pub(super) type AxisFormatterFn = fn(f64, usize, &RangeInclusive<f64>) -> String
|
|||||||
|
|
||||||
/// Generic constant for x-Axis
|
/// Generic constant for x-Axis
|
||||||
pub(super) const X_AXIS: usize = 0;
|
pub(super) const X_AXIS: usize = 0;
|
||||||
|
|
||||||
/// Generic constant for y-Axis
|
/// Generic constant for y-Axis
|
||||||
pub(super) const Y_AXIS: usize = 1;
|
pub(super) const Y_AXIS: usize = 1;
|
||||||
|
|
||||||
@@ -29,12 +30,14 @@ pub enum Placement {
|
|||||||
// shorthand types for AxisHints, public API
|
// shorthand types for AxisHints, public API
|
||||||
/// Configuration for x-axis
|
/// Configuration for x-axis
|
||||||
pub type XAxisHints = AxisHints<X_AXIS>;
|
pub type XAxisHints = AxisHints<X_AXIS>;
|
||||||
|
|
||||||
/// Configuration for y-axis
|
/// Configuration for y-axis
|
||||||
pub type YAxisHints = AxisHints<Y_AXIS>;
|
pub type YAxisHints = AxisHints<Y_AXIS>;
|
||||||
|
|
||||||
// shorthand types for AxisWidget
|
// shorthand types for AxisWidget
|
||||||
pub(super) type XAxisWidget = AxisWidget<X_AXIS>;
|
pub(super) type XAxisWidget = AxisWidget<X_AXIS>;
|
||||||
pub(super) type YAxisWidget = AxisWidget<Y_AXIS>;
|
pub(super) type YAxisWidget = AxisWidget<Y_AXIS>;
|
||||||
|
|
||||||
/// Axis configuration.
|
/// Axis configuration.
|
||||||
///
|
///
|
||||||
/// Used to configure axis label and ticks.
|
/// Used to configure axis label and ticks.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use epaint::Pos2;
|
use epaint::Pos2;
|
||||||
|
|
||||||
use crate::{Id, Context};
|
use crate::{Context, Id};
|
||||||
|
|
||||||
use super::{AxisBools, transform::ScreenTransform};
|
use super::{transform::ScreenTransform, AxisBools};
|
||||||
|
|
||||||
/// Information about the plot that has to persist between frames.
|
/// Information about the plot that has to persist between frames.
|
||||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||||
@@ -11,9 +11,13 @@ pub(super) struct PlotMemory {
|
|||||||
/// Indicates if the user has modified the bounds, for example by moving or zooming,
|
/// Indicates if the user has modified the bounds, for example by moving or zooming,
|
||||||
/// or if the bounds should be calculated based by included point or auto bounds.
|
/// or if the bounds should be calculated based by included point or auto bounds.
|
||||||
pub(super) bounds_modified: AxisBools,
|
pub(super) bounds_modified: AxisBools,
|
||||||
|
|
||||||
pub(super) hovered_entry: Option<String>,
|
pub(super) hovered_entry: Option<String>,
|
||||||
|
|
||||||
pub(super) hidden_items: ahash::HashSet<String>,
|
pub(super) hidden_items: ahash::HashSet<String>,
|
||||||
|
|
||||||
pub(super) last_screen_transform: ScreenTransform,
|
pub(super) last_screen_transform: ScreenTransform,
|
||||||
|
|
||||||
/// Allows to remember the first click position when performing a boxed zoom
|
/// Allows to remember the first click position when performing a boxed zoom
|
||||||
pub(super) last_click_pos_for_zoom: Option<Pos2>,
|
pub(super) last_click_pos_for_zoom: Option<Pos2>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -579,6 +579,7 @@ impl Plot {
|
|||||||
}
|
}
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the y axis label of the main y-axis
|
/// Set the y axis label of the main y-axis
|
||||||
///
|
///
|
||||||
/// If no y-axis has been specified so far a new one will be created.
|
/// If no y-axis has been specified so far a new one will be created.
|
||||||
|
|||||||
Reference in New Issue
Block a user