pgf-tikz / pgfplots

pgfplots - A TeX package to draw normal and/or logarithmic plots directly in TeX in two and three dimensions with a user-friendly interface and pgfplotstable - a TeX package to round and format numerical tables. Examples in manuals and/or on web site.
http://pgfplots.sourceforge.net/
200 stars 35 forks source link

Increasing just the legend box line width #320

Closed pgf-tikz-bot closed 4 years ago

pgf-tikz-bot commented 14 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/ Author: phrzn Timestamp: 2010-06-21 20:56:11

Is there any way of increasing the legend box line width without increasing the legend sample line width? I've tried to use

legend style={nodes=right,line width=1.5pt}

in order to increase the line width, but this affects the whole legend "item" (or what to call it). In other words, I'm looking for something similar to

outer axis line style={line width=0.8pt}

but only for the legend box. I can't find anything about this in the manual, so I hope someone from the maintenance team can help me out :)

I've added a .tex file which shows what I don't want to achieve - just for illustrating what I want to avoid.

pgf-tikz-bot commented 14 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/#d011 Author: phrzn Timestamp: 2010-06-21 20:56:11

https://sourceforge.net/p/pgfplots/support-requests/_discuss/thread/c6bb4808/d011/attachment/main.tex Short example showing the opposite of what I try to achieve.

pgf-tikz-bot commented 14 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/#c828 Author: ludewich Timestamp: 2010-06-22 19:40:47

Hi,

One possible solution is to add cells={line width=0.4pt} (which, according to the pgfmanual, is the default line width).

Thus, the line becomes:

legend style={nodes=right,line width=1.5pt,cells={line width=0.4pt}}

The cells style applies to the cells inside of the legend and thus resets the outer line width.

I admit it is not the fully satisfactory solution... studying the pgfmanual.pdf for how to change styles for matrices lead me to the conclusion that maybe it is the only solution at hand (the legend is actually nothing but a TikZ matrix).

I hope it helps for the moment. I fear I can't provide more (unless I missed something about the usage of TikZ matrices).

Best regards Christian

pgf-tikz-bot commented 14 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/#b79a Author: ludewich Timestamp: 2010-06-22 19:40:47

pgf-tikz-bot commented 14 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/#7e4f Author: phrzn Timestamp: 2010-06-23 09:36:23

Thanks for the answer! As long as it works I'm satisfied for now, although I agree something which would have been easier to find out by myself would have been better ;)

Again, thanks for the help.

Best regards,

drgz

pgf-tikz-bot commented 12 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/#5ce1 Author: ludewich Timestamp: 2011-11-27 17:08:02

pgf-tikz-bot commented 12 years ago

Migrated from SourceForge https://sourceforge.net/p/pgfplots/support-requests/2/#4fcb Author: ludewich Timestamp: 2011-11-27 17:08:02

Despite the fact that the proposed solution is only a work-around, I close this item (one could pose a feature request for tikz to get the complete functionality).