Skip to content

Plot more than one distribution into the same histogram #2

Description

@zifredder

It would be nice to be able to add data sets as separate distributions to an existing histogram.
TODO:

  • To have all distributions be visible, the bars should not occlude each other. To set an alpha value for the bars, the fourth 'colorBar' entry can be set: http://undocumentedmatlab.com/blog/plot-line-transparency-and-color-gradient. This would apply to other elements that might occlude each other, too, such as the CI lines.
  • When the graphics objects are redrawn, the associated procedures must be adjusted to redraw each distribution. This could be implemented by using static (re)draw functions that are called on each CircHist object in the axes (stored in the 'UserData' property).
  • The function 'addData' (or so) adds a distribution, supporting both raw angle distributions and already-binned data, with additional arguments.
  • Calling the constructor with a target axes that is already used by a CircHist object should trigger 'addData' with the specified parameters, thereby adding the passed data. Checking for an existing distribution could be done via the axes' 'UserData' property.
  • Bar colors should be automatically rotated analogous to MATLAB's behavior when additional graphics objects are added to existing objects, provided the colors are not specified.
  • Distribution of different types should be combinable, e. g., a circular distribution with a circular average angle and an axial distribution with an axial average angle should be able to exist in the same histogram.
  • It needs to be asserted that all distributions have the same 'histType', else they could not have the same scale bar. Having several scale bars that apply to different distributions is conceivable, but would probably be very complicated and does not seem necessary to me at the moment.
  • Each CircHist object represents one distribution with the associated data and an axes can be parent of several CircHist objects; hence, all (most?) drawing operations need to be able to handle drawing several distributions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions