Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

copy coordinates from one graph to another

0 votes
osHi,

I have two isomorpg graphs. Olny difference is node shape, size and color. When I use the same layouts for both they still do not look the same. However, when looking at the xml (graphml) files a solution would be to copy the x and y coordinates from one -- layouted -- file to another.

file 1 node 1:

<node id="n0">
      <data key="d4"/>
      <data key="d5">
        <y:ShapeNode>
          <y:Geometry height="30.0" width="30.0" x="1816.084431453081" y="510.337406"/>
          <y:Fill color="#B2DF8A" transparent="false"/>
          <y:BorderStyle color="#000000" type="line" width="2.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="258.84765625" x="-114.423828125" y="6.015625">Nicotinamide adenine dinucleotide (nad+)</y:NodeLabel>
          <y:Shape type="roundrectangle"/>
        </y:ShapeNode>
      </data>
    </node>
 

file 2 node 1:

    <node id="n0">
      <data key="d5">
        <y:ShapeNode>
          <y:Geometry height="30.0" width="30.0" x="1861.0039156110827" y="405.638551"/>
          <y:Fill color="#B2DF8A" transparent="false"/>
          <y:BorderStyle color="#000000" type="line" width="2.0"/>
          <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="258.84765625" x="-114.423828125" y="6.015625">Nicotinamide adenine dinucleotide (nad+)</y:NodeLabel>
          <y:Shape type="roundrectangle"/>
        </y:ShapeNode>
      </data>
    </node>

Simply I cannot do it. I was playing around with sed, xml and python igraph, but did not manage to solve it.

Anyone an idea. Most welcome!

Thanks

Dom
in Help by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
Legal Disclosure | Privacy Policy
...