Hello guys,
I would like to ask for some insights and hints as to how to solve the following small problem. I am creating plots for my thesis. These plots are created in Matlab and I edit them later in Inkscape. What I mostly do is to change markers for points in the plots, annotate the plots, and the like.
Now the problem. I have a plot with 5 lines, each line corresponding to an experiment. Each line has 180 points somewhere around it; these points are the actual data about the theoretical line. Now, I need to *replace* each of points by a beautiful marker of mine. The reason is that Matlab creates only a limited number of rather ugly markers. These markers are also converted (either by Matlab or epstool) into strokes each having 70 points :( :( So, Inkscape slows down and my file bloats.
What I was doing so far and what I am tired of is that I manually select a point and its cloned marker and then using the alignment dialog align them over each other. Then I remove Matlab's markers for good.
While this works OK, you can imagine how tired I am. I was playing with the idea of manually parsing the XML file in Perl but I rejected the idea as sure way to mess up the document. The Matlab's markers have custom color that I assigned to them so that I can easily find the points I need to replace...
Does anybody have an insight into how to do this is more or less Inkscape fashion? I am not afraid of scripting in Inkscape, but I haven't gotten a chance to try it yet. Or am I missing some obvious "group and align the whole" idea?
Thank you for tips!
David
David Soukal wrote:
I would like to ask for some insights and hints as to how to solve the following small problem. I am creating plots for my thesis. These plots are created in Matlab and I edit them later in Inkscape. What I mostly do is to change markers for points in the plots, annotate the plots, and the like.
Now the problem. I have a plot with 5 lines, each line corresponding to an experiment. Each line has 180 points somewhere around it; these points are the actual data about the theoretical line. Now, I need to *replace* each of points by a beautiful marker of mine. The reason is that Matlab creates only a limited number of rather ugly markers. These markers are also converted (either by Matlab or epstool) into strokes each having 70 points :( :( So, Inkscape slows down and my file bloats.
What I was doing so far and what I am tired of is that I manually select a point and its cloned marker and then using the alignment dialog align them over each other. Then I remove Matlab's markers for good.
While this works OK, you can imagine how tired I am. I was playing with the idea of manually parsing the XML file in Perl but I rejected the idea as sure way to mess up the document. The Matlab's markers have custom color that I assigned to them so that I can easily find the points I need to replace...
Does anybody have an insight into how to do this is more or less Inkscape fashion? I am not afraid of scripting in Inkscape, but I haven't gotten a chance to try it yet. Or am I missing some obvious "group and align the whole" idea?
I bet we can come up with something. Can you provide some more concrete examples and some files?
Aaron Spike
I bet we can come up with something. Can you provide some more concrete examples and some files?
Aaron Spike
Thank you very much! I've attached an example. The plot is done half way through. I replaced the points along the first three top lines (green, blue, red). Now I am about to replace the bottom two.
The small points are actually strokes created by Matlab or EPS Tool (I don't know which one to blame). The markers in the box at the very top of the plot are originals whose clones should be used to replace the dots. They don't have to be clones -- if that should help anything.
The points should be aligned with a corresponding marker for the line...
Thanks again!
David
BTW: The annotatinos of the left axis is intentionally "misaligned" because they will be aligned during PSFrag conversion in LaTeX.
David Soukal wrote:
Thank you very much! I've attached an example. The plot is done half way through. I replaced the points along the first three top lines (green, blue, red). Now I am about to replace the bottom two.
The small points are actually strokes created by Matlab or EPS Tool (I don't know which one to blame). The markers in the box at the very top of the plot are originals whose clones should be used to replace the dots. They don't have to be clones -- if that should help anything.
The points should be aligned with a corresponding marker for the line...
Sure, that looks like a manageable task. And it looks like you could save time even if you wrote a new script for every illustration. ;) Do you ever hang out on irc? Try taking a gander at the python scripts based on inkex.py in the share/extensions directory. If you have any questions, I'll do my best to help.
Sure, that looks like a manageable task. And it looks like you could save time even if you wrote a new script for every illustration. ;) Do you ever hang out on irc? Try taking a gander at the python scripts based on inkex.py in the share/extensions directory. If you have any questions, I'll do my best to help.
Thank you Aaron!
I'll most certainly give it a try (I love learning these automation skills, so I can impress my colleagues with my effectivity :).
I'll kindly ask you for help if I run into trouble!
Good night & thanks again,
David
participants (2)
-
unknown@example.com
-
David Soukal