How to use the beakerx.beakerx.plot.plotitem.BasedXYGraphics function in beakerx

To help you get started, we’ve selected a few beakerx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github twosigma / beakerx / beakerx / beakerx / plot / plotitem.py View on Github external
def __init__(self, *args, **kwargs):
        super(BasedXYGraphics, self).__init__(*args, **kwargs)
        base = getValue(kwargs, 'base')
        if isinstance(base, list):
            self.bases = base
        else:
            self.bases = getValue(kwargs, 'base', 0)
github twosigma / beakerx / beakerx / beakerx / plot / plotitem.py View on Github external
self.style = getValue(kwargs, 'style')
        self.interpolation = getValue(kwargs, 'interpolation')
        self.color = getColor(getValue(kwargs, 'color'))


class BasedXYGraphics(XYGraphics):
    def __init__(self, *args, **kwargs):
        super(BasedXYGraphics, self).__init__(*args, **kwargs)
        base = getValue(kwargs, 'base')
        if isinstance(base, list):
            self.bases = base
        else:
            self.bases = getValue(kwargs, 'base', 0)


class Bars(BasedXYGraphics):
    def __init__(self, *args, **kwargs):
        super(Bars, self).__init__(*args, **kwargs)

        width = getValue(kwargs, 'width')
        if isinstance(width, list):
            self.widths = width
        else:
            self.width = width

        color = getColor(getValue(kwargs, 'color'))
        if isinstance(color, list):
            self.colors = color
        else:
            self.color = color

        outlineColor = getColor(getValue(kwargs, 'outlineColor'))
github twosigma / beakerx / beakerx / beakerx / plot / plotitem.py View on Github external
self.fill = fill

        color = getColor(getValue(kwargs, 'color'))
        if isinstance(color, list):
            self.colors = color
        else:
            self.color = color

        outlineColor = getColor(getValue(kwargs, 'outlineColor'))
        if isinstance(outlineColor, list):
            self.outline_colors = outlineColor
        else:
            self.outline_color = outlineColor


class Stems(BasedXYGraphics):
    def __init__(self, *args, **kwargs):
        super(Stems, self).__init__(*args, **kwargs)
        self.width = getValue(kwargs, 'width', 1.5)
        color = getColor(getValue(kwargs, 'color'))
        if isinstance(color, list):
            self.colors = color
        else:
            self.color = color

        style = getValue(kwargs, 'style')
        if isinstance(style, list):
            self.styles = style
        else:
            self.style = getValue(kwargs, 'style', StrokeType.SOLID)
github twosigma / beakerx / beakerx / beakerx / plot / plotitem.py View on Github external
super(Stems, self).__init__(*args, **kwargs)
        self.width = getValue(kwargs, 'width', 1.5)
        color = getColor(getValue(kwargs, 'color'))
        if isinstance(color, list):
            self.colors = color
        else:
            self.color = color

        style = getValue(kwargs, 'style')
        if isinstance(style, list):
            self.styles = style
        else:
            self.style = getValue(kwargs, 'style', StrokeType.SOLID)


class Area(BasedXYGraphics):
    def __init__(self, *args, **kwargs):
        super(Area, self).__init__(*args, **kwargs)
        self.color = getColor(getValue(kwargs, 'color'))
        self.interpolation = getValue(kwargs, 'interpolation')


class Text(BaseObject):
    def __init__(self, **kwargs):
        super(Text, self).__init__(**kwargs)
        self.x = getValue(kwargs, 'x', 0)
        self.y = getValue(kwargs, 'y', 0)
        self.color = getColor(getValue(kwargs, 'color'))
        self.size = getValue(kwargs, 'size', 13)
        self.text = getValue(kwargs, 'text', '')
        self.show_pointer = getValue(kwargs, 'show_pointer', True)
        self.pointer_angle = getValue(kwargs, 'pointerAngle',
github twosigma / beakerx / beakerx / beakerx / plot / plotitem.py View on Github external
current = graphicsList[gIndex]
                padYs(current, maxel)
                previous = graphicsList[gIndex - 1]
                currentYs = current.y
                previousYs = previous.y

                for yIndex in range(len(currentYs)):
                    currentYs[yIndex] = currentYs[yIndex] + previousYs[yIndex]

                current.bases = previousYs
                stackedList.append(current)

            return stackedList


class Crosshair(BasedXYGraphics):
    def __init__(self, *args, **kwargs):
        super(Crosshair, self).__init__(*args, **kwargs)
        self.width = getValue(kwargs, 'width')
        self.style = getValue(kwargs, 'style')
        self.color = getColor(getValue(kwargs, 'color'))


class CategoryGraphics(Graphics):
    def __init__(self, **kwargs):
        super(CategoryGraphics, self).__init__(**kwargs)
        self.center_series = getValue(kwargs, 'centerSeries', False)
        self.use_tool_tip = getValue(kwargs, 'useToolTip', True)
        self.showItemLabel = getValue(kwargs, 'showItemLabel', False)
        self.outline = getValue(kwargs, 'outline', False)
        self.labelPosition = getValue(kwargs, 'labelPosition', "CENTER")
        self.fills = getValue(kwargs, 'fill')