Hi Leonard,
Leonard Mada wrote:
Hi Ingrid, hi Bjoern,
When the diagram is resized now by the user afterwards. How should the
low level shapes that were created by script now be replaced and
resized? You might want to strech a bar but you might don't want your
symmetric symbol be stretched. Low level shapes don't know anything
about coordinate systems. So with this simlpe approach the diagram
would look like rubbish after the first resize.
I do not get the point. I just wanted to test this:
- started R
- created a large vector object 'y'
- draw a histogram: 'hist(y)'
- resized => everything looks perfect
- load package MASS, run truehist(y), resize => everything is OK
Shapes are resized perfectly.
I downloaded this R script
(http://addictedtor.free.fr/graphiques/sources/source_65.R) and run it,
resized it; it's OK. When it is very small, it does not look as good,
but it is perfect for any decent size. And it is very complex. I really
do not get the point.
Could you please give a more detailed description, in wich situation,
the resize would be catastrophic?
It was your suggestion to just create low level shapes and store them.
The problem with these low level shapes (that could be stored quite
easily) is that they do not contain any information about logic
coordinates in a chart coordinate system. In contrast they have a
position and size given with respect to the chart window (which is not
the coordinate system area only but the window that contains the title,
the subtitle, the axis titles and the legend in addition ).
Now consider for example you change the x axis description font size.
The labels get bigger -> need more space -> the coordinate system area
gets smaller. But the low level shapes are still placed on the same
position in the window which is not fitting to the changed coordinate
system positions anymore.
> You have no titles, no legend
That were another 10 lines of code for quite some extensive annotations
(including arrows, see the example in the Asymptote pdf help file,
pp72-75). Changing triangle for circle (not in the example, but I tested
it) would be done by: replacing one guide with "guide
c2=(0,0)--(1,2)--(2,0)--cycle;". It's that simple.
Titles & Legend:
box(Label("$A$",z1));
box(Label("$B$",z2));
pair z=(0,-2);
real m=3;
margin BigMargin=Margin(0,m*dot(unit(z1-z),unit(z0-z)));
draw(Label("$A\cap B$",0),conj(z)--z0,Arrow,BigMargin);
draw(Label("$A\cup B$",0),z--z0,Arrow,BigMargin);
draw(z--z1,Arrow,Margin(0,m));
draw(z--z2,Arrow,Margin(0,m));
shipout(bbox(0.25cm));
For a very complex chart, see the R script above. (it has less than 50
lines and I do not beleive, we will have it anytime soon in Chart, but
you find such charts very commonly in the financial markets)
> If the script is only used for initial creation, you can never allow
a data update when the user has already changed something.
1. There is some truth in it, but again, because these scripts are so
customizable, you could do almost everything regarding the chart inside
the script, so when changing the original data, you only have to rerun
the script.
2. I will have a brainstorming session on this issue: this seems not
difficult to solve for simple changes (like some caption has changed, or
some point data has changed); it will be difficult though if a whole
data series has changed
Many thanks for your patients,
Leonard Mada
Thanks for your interest,
Ingrid
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]