Skip to content
This repository was archived by the owner on Nov 19, 2018. It is now read-only.
This repository was archived by the owner on Nov 19, 2018. It is now read-only.

[80] Setting default graph/node/edge attrs in an existing graph has no effect #16

Open
@prmtl

Description

@prmtl

Reported by zvi.ta...@gmail.com, 2013-03-01T10:46:07Z

What steps will reproduce the problem?
  1. g = pydot.graph_from_dot_data("""
    digraph G {
    1 -> 2;
    }
    """)
  2. g.set_node_defaults(style="filled", fillcolor="yellow")
  3. g.write_png("simple.yellow.png")
What is the expected output? What do you see instead?

Should see yellow nodes, but nodes are still white.

What version of the product are you using? On what operating system?

Pydot 1.0.28, Python 2.7.3

Please provide any additional information below.

Default attributes are added to the BOTTOM of the DOT spec, after existing nodes and edges, so they don't take effect. They should be inserted at the TOP of the spec to take effect everywhere.

The attached file demonstrates the problem and the solution.
Attached pydot_bug.py (view on Gist)
From: https://code.google.com/p/pydot/issues/detail?id=80

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions