Skip to content

Axis properties not changing graph's behavior #60

@grassjelly

Description

@grassjelly

I'm trying to modify my graph's axis properties as the label and grid lines don't appear. Assigned some numbers but doesn't seem to change anything on the graph.

Here's my code. Data is updated dynamically in a callback where I pass a vector to line.x and line.y:

xpl::figure fig;
xpl::linear_scale sx, sy;
xpl::lines line(sx, sy);
line.colors = std::vector<std::string>({"blue"});

xpl::axis hx(sx), hy(sy);
hx.grid_lines = "solid";
hx.label = "x";
hx.label = "y";
hx.color = "#060482";

hx.grid_color = "#060482";
hy.orientation = "vertical";
hy.grid_lines = "solid";
hy.side = "left";

fig.add_axis(hx);
fig.add_axis(hy);

fig.add_mark(line);
fig

Output graph:
Screenshot from 2020-07-13 13-19-17

Here's my package versions running on Ubuntu 18.04 running on conda version 4.8.3
Screenshot from 2020-07-13 13-17-27

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions