gramm
gramm copied to clipboard
Supressing outputs from g.draw();
I am using gramm inside Matlab's Live Editor, to produce a manuscript-like document. Two unexpected behaviours make this task difficult:
- after each
g.draw();
call, I get an output like
ans =
3×1 Line array:
Line
Line
Line
Is there a way to supress that output? Didn't find any obvious code in @gramm\draw.m that produces that output, such as a line calling on some axis variable that ends without a semicolon.
- In the live-script's in-line output, my plot is displayed not immediately after the
g.draw()
call (and its text outputs, cf above), but only after the following two lines of code, which control legends, have also been executed:
g.legend_axe_handle.Children(3).String='Condition 1'
g.legend_axe_handle.Children(1).String='Condition 2'
Is there some delay between g.draw()
and the appearance of the plot? Else, how can I make the plot immediately follow the g.draw()
call?
Thank you!
Hi @wildetudor, thanks for the feedback, I'd need to hunt where semicolons are missing ! For the live script, this is peculiar and worth looking into further (I'm not used yet to live scripts). How did you find out that these lines were needed, or is any command that updates the plot working too ?
I had to use those lines in order to customise the legend, but there seems to be this delay between when g.draw() is called and when the live script produces the plot. There's probably nothing special about those 2 lines (same happens if you update the plot in some other way), but simply a delay between input code & output plots, perhaps due to how matlab`s live editor works (don't know it well myself)
Hi @wildetudor
Sorry for the gigantic wait. Gramm was on hold but I now have the opportunity to work on it! I can't currently reproduce the issue on recent Matlab versions on Mac : I don't get any text output when calling draw()
, nor do I need to execute additional code to get graphical output. The only thing to be careful about seems to be to create new figures to avoid overlays.
I'm closing the issue, but don't hesitate to reopen with an exemple file if you still have the same problem.