Struct Xbins

Source
pub struct Xbins { /* private fields */ }

Implementations§

Source§

impl Xbins

Source

pub fn start(&mut self, start: Any) -> &mut Self

Sets the starting value for the x axis bins. Defaults to the minimum data value, shifted down if necessary to make nice round values and to remove ambiguous bin edges. For example, if most of the data is integers we shift the bin edges 0.5 down, so a size of 5 would have a default start of -0.5, so it is clear that 0-4 are in the first bin, 5-9 in the second, but continuous data gets a start of 0 and bins [0,5), [5,10) etc. Dates behave similarly, and start should be a date string. For category data, start is based on the category serial numbers, and defaults to -0.5. If multiple non-overlaying histograms share a subplot, the first explicit start is used exactly and all others are shifted down (if necessary) to differ from that one by an integer number of bins.

Source

pub fn end(&mut self, end: Any) -> &mut Self

Sets the end value for the x axis bins. The last bin may not end exactly at this value, we increment the bin edge by size from start until we reach or exceed end. Defaults to the maximum data value. Like start, for dates use a date string, and for category data end is based on the category serial numbers.

Source

pub fn size(&mut self, size: Any) -> &mut Self

Sets the size of each x axis bin. Default behavior: If nbinsx is 0 or omitted, we choose a nice round bin size such that the number of bins is about the same as the typical number of samples in each bin. If nbinsx is provided, we choose a nice round bin size giving no more than that many bins. For date data, use milliseconds or M for months, as in axis.dtick. For category data, the number of categories to bin together (always defaults to 1). If multiple non-overlaying histograms share a subplot, the first explicit size is used and all others discarded. If no size is provided,the sample data from all traces is combined to determine size as described above.

Trait Implementations§

Source§

impl Default for Xbins

Source§

fn default() -> Xbins

Returns the “default value” for a type. Read more
Source§

impl Serialize for Xbins

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Xbins

§

impl RefUnwindSafe for Xbins

§

impl Send for Xbins

§

impl Sync for Xbins

§

impl Unpin for Xbins

§

impl UnwindSafe for Xbins

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.