def test_axes_plot_masked_nan(): x = numpy.linspace(0, 2 * numpy.pi, 51) y = numpy.ma.column_stack(( 1 + 0.5 * numpy.sin(x), 1 + 0.5 * numpy.cos(x), 1 + 0.2 * numpy.sin(2 * x), )) y[8:18, 0] = numpy.nan y[33:43, 1] = numpy.ma.masked canvas, axes, mark = toyplot.plot(x, y, marker="o") assert_canvas_matches(canvas, "axes-plot-masked-nan")
def genome_graph(self): """ Graphs rolling average of likelihoods along the linear genome, identifies regions that deviate significantly from null expectations TO DO: change color of outliers """ self.likes['rollingav'] = self.likes[0].rolling( 50, win_type='triang').mean() a, b, c = toyplot.plot( self.likes['rollingav'], width=500, height=500, color='blue', ) b.hlines(self.high_lik, style={ "stroke": "red", "stroke-width": 2 })
def step_impl(context): canvas, axes, mark = toyplot.plot(numpy.linspace(0, 1) ** 2, style={"stroke-dasharray":"5,5"}) testing.assert_canvas_equal(canvas, "style-stroke-dasharray")
def step_impl(context): canvas, axes, mark = toyplot.plot(numpy.linspace(0, 1)**2, style={"stroke-dasharray": "5,5"}) testing.assert_canvas_equal(canvas, "style-stroke-dasharray")