Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSAB] Task 2: Allow users to pass titles for the x- and y-axes #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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.

1 participant