Skip to content

Conversation

@robert
Copy link
Owner

@robert robert commented Mar 31, 2019

This is one way to solve Task 2 in https://robertheaton.com/2019/04/14/open-source-for-advanced-beginners-1-bashplotlib/ .

Test:

I ran:

from bashplotlib.scatterplot import plot_scatter

x_coords = [-10,20,30]
y_coords = [-10,20,30]
width = 10
char = 'x'
color = 'default'
title = 'Test Title'

plot_scatter(
    None,
    x_coords,
    y_coords,
    width,
    char,
    color,
    title,
    xtitle="My X Axis",
    ytitle="My Y Axis")

and got:

image

def _plot_scatter(xs, ys, size, pch, colour, title, cs, xtitle, ytitle):
plotted = set()

x_scale = get_scale(xs, False, size)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assigned these scales to variables because we were calling the get_scale function a lot and it was getting a bit messy.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants