Hi Florian,

- Using PGFPlots v1.16 `enlarge x limits` is working fine on both
  groupplots.
- The simplest way of getting rid of the both bars as legend image is
  to add `area legend` to the ` groupplot` options.
  If you need to draw something else, have a look at section 4.9.5
  page 260ff (especially page 262) of the current manual (v1.16)
        
<http://mirrors.ctan.org/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf#page=262>

Besides that you maybe have noticed that the `ymin` values are different for 
the two plots. Thus I recommend setting `ymin=1` explicitly. This will then 
change also the first plot lower part because of your `enlarge y limits` 
statement. To make it look similar as before change the given value to 
something like 0.01.

Because you haven't stated a MWE, i.e. I don't know which `compat` level you 
are using: In case you use a value >1.5 the lower end of the bars will be cut 
at 10^0. To avoid this you should also add `log origin=infty` to the 
`groupplot` options.


Best regards,
Stefan


PS: I recommend that you in future ask these kind of questions on
        <https://tex.stackexchange.com/>
The chance of getting an answer there is much much greater than on this mailing 
list.


> -----Original Message-----
> From: Florian Lindner [mailto:mailingli...@xgm.de]
> Sent: Wednesday, January 16, 2019 2:48 PM
> To: pgfplots-features@lists.sourceforge.net
> Subject: [Pgfplots-features] enlarge x limits in groupplot and multiple
> symbols in legend
> 
> Hello,
> 
> I have a plot, generated from the two tiny data files I have attached. It
> basically works great, with two small issues:
> 
> * enlarge x limits seems to have only an effect on the first group plot. I
> also tried putting it in \nextgroupplot[here], but same effect.
> 
> * The legend contains two symbols (of the same color) for each entry, like
> "☐ ☐ Filling evaluation". How can I omit the second symbol?
> 
> Thanks a lot!
> Florian
> 
> \begin{figure}
>   \centering
>   \ref{leg:TimingsPreallocation}
>   \begin{tikzpicture}
>     \begin{groupplot}[
>       group style={columns=2, y descriptions at=edge left},
>       ybar={0cm},
>       symbolic x coords={off, compute, save, tree},
>       xtick=data,
>       xticklabels={No preallocation, Explicitly computed, Computed \&
> saved, Spatial tree},
>       /pgf/bar width=9pt,
>       enlarge x limits=0.18, enlarge y limits={value=0.3, lower},
>       ymode=log,
>       ylabel={Time [ms]},
>       x tick label style={rotate=30},
>       ymax=40000,
>       legend entries={Filling evaluation, Preallocation evaluation,
> Filling interpolation, Preallocation interpolation},
>       legend to name={leg:TimingsPreallocation}, legend columns=2]
> 
>       \nextgroupplot
>       \addplot+ table[y=fillA]{prealloc-80.csv};
>       \addplot+ table[y=preallocA]{prealloc-80.csv};
>       \addplot+ table[y=fillC]{prealloc-80.csv};
>       \addplot+ table[y=preallocC]{prealloc-80.csv};
> 
>       \nextgroupplot
>       \addplot+ table[y=fillA]{prealloc-100.csv};
>       \addplot+ table[y=preallocA]{prealloc-100.csv};
>       \addplot+ table[y=fillC]{prealloc-100.csv};
>       \addplot+ table[y=preallocC]{prealloc-100.csv};
>     \end{groupplot}
>   \end{tikzpicture}
> \end{figure}

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to