TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a bar graph using pgfplot and option ybar. I would get a graph wider. I used width option



                             xlabel=packet loss,ylabel=energia,
                             legend pos = north west]
            \addplot [fill=red!50,draw=red!50!black]
                table [x=pep,y=1]
            \addplot [fill=blue!70, draw=blue!50!black]
                table [x=pep,y=20]
            \addplot [fill=violet!70, draw=violet!50!black]
                table [x=pep,y=50]
            \addplot [fill=orange!50, draw=orange!50!black]
                table [x=pep,y=100]


but the plot became bigger in height and width. Instead I would have only a wider graph

share|improve this question

closed as too localized by Joseph Wright Feb 2 '13 at 22:37

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I don't remember how many times I've already asked you to make minimal working examples (MWE) showing the needed packages. – egreg Dec 24 '12 at 16:29
I don't understand in this case which is the reason I have to put package...the example is not exacutable because it calls file in my hard disk. I'm asking only if it exist a option to get wider plot – Mazzy Dec 24 '12 at 16:32
People expert in plots usually have data files available. But you're not helping them in making a complete example that one can play with, without the need to guess packages. – egreg Dec 24 '12 at 16:34
ok right...I will add needed packages – Mazzy Dec 24 '12 at 16:35
If you give a width option and leave the height option free, it will try to keep the aspect ratio constant. Otherwise x post scale would be suitable for you though I'm not sure if I understand your question correctly. – percusse Dec 24 '12 at 17:03