As a novice TikZ user, I can only draw some lines after spending hours reading the TikZ manual, which made me go with Adobe Illustrator to quickly draw what I want despite the ton of features I left behind by not drawing with TikZ.

So, I thought many times of asking How to draw this? questions, but quickly realized that I will get the typical response of Show us what you have tried. However, what if I don't know the basic knowledge that can make me able to go to a starting point since the manual can swallow me for days without knowing what I should do or where I can start.

So, my main question is: can TikZ experts be tolerant and not push the user for having an MWE considering that even an initial MWE is difficult for some of the OPs including me?

  • 16
    My personal opinion: even if one is only able to draw a line it is possible to create a MWE like \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) -- (1,1); \end{tikzpicture} \end{document} This a) gives the people trying to help you a starting point without having to type the same boring things over and over again, b) tells some basics about the documentclass etc (in case there are special things to pay attention to, like in beamer) and c) shows some commitment to the question. – samcarter Aug 5 at 15:27
  • 13
    and d) also helps to judge the level of necessary explanation. – samcarter Aug 5 at 15:29
  • 5
    A bit more serious advice: start a google picture search with site:tex.stackexchange.com in it. Then you will very likely find a good starting point provided you enter the right keywords. The good new is that you will very quickly know how to guess these keywords. Then try to modify the starting point, if you get stuck you'll have a nice starting point which you can post (including the link to the source of your starting point, please). – marmot Aug 5 at 15:45
  • 6
    Just as people are free to ask for a MWE, you are free to not give one. If you do this a lot, however, people might perceive you as just using the site to have other people do your work for you. But there are always people who are willing to answer such questions. But you might also want to think about the longer term effects of your asking such questions: do you end up with code that you copy without understanding? If so, then perhaps you need to spend the time to learn more, in which case you will then be in a better position to post MWEs (and probably better quality questions.) – Alan Munn Aug 5 at 16:01
  • 3
    One thing you can do though is beeing honest: I need this with TikZ, but i don't have the knowledge nor the time to learn. I have set a 500 points bounty. Can someone help me out? I would be completely fine with that. – Johannes_B Aug 6 at 17:02
  • @Johannes_B I would rather learn TikZ than spend 500 points every time (out of 4 according to my current points) I ask a question :). – Diaa Aug 6 at 17:08
  • 1
    @Diaa Why would you need 500 points 'every time'? That suggests you really do want a do-it-for-me service, with no effort on your part. To put this another way: there is some excuse (though not much) for playing helpless when asking a first TikZ question. But, after that, you should be able to post an MWE. Obviously, you shouldn't start by asking for the code for something really complicated: you'd start by asking how to draw something simple. Then you can gradually build up, asking questions as needed. One reason to do this might be that many of the examples here an elsewhere are complex... – cfr Aug 19 at 15:42
  • 1
    ... and it is hard to begin with complex. However, I suspect a better beginning would be to work through the tutorials at the beginning of the TikZ manual. If you are starting with, say, drawing automata or calculating path intersects, then obviously the docs will eat you alive. So don't start there. :-) Break complex diagrams down into component steps: what needs drawing first? A triangle? OK, the manual will probably do that for you, but maybe the labels are tricky, so ask that bit. Then tackle the next bit etc. – cfr Aug 19 at 15:43
up vote 13 down vote accepted

You can add incomplete MWEs, here is an example (with bonus frustration)

\documentclass[tikz]{standalone}
\usetikzlibrary{..., ..., ...}
\begin{document}
  \begin{tikzpicture}
  % I have these coords
  \coordinate (A) at (0,0);
  \coordinate (B) at (1,1);
  ...
  % How the $☢@🕱# can I make the following work? 
  \somemagicaltikzstuff


  % but there should be something like this 
  \draw[nicely=True, easily=0.5] from (A) to (B);

  \end{tikzpicture}
\end{document}

[Picture of what I want]

[Picture of what I have] (optional)

Then others will know exactly what the problem is and how to fill in the missing parts. This is of course not set in stone but makes the life of others much easier.

  • 1
    Please remove the "$☢@🕱#" because I cannot copy these symbols in the editor which I am using for LaTeX. ;-) – marmot Aug 5 at 21:30
  • I like the care you took in indenting your code :) – Diaa Aug 5 at 21:32
  • @marmot Unicode revolution is over. – percusse Aug 8 at 22:23

If you need a drawing quickly for a current publication there is nothing wrong with making it in illustrator or whatever.

When asking a question it always helps to give a MWE (as Samcarter commented even if it's only documentclass... but if you started to draw a sample figure and get stuck it is far better to ask about just that one item. So rather than ask how to draw a complete aircraft schematic for which systems other than tikz may be more suitable anyway, just ask about one thing, how to do a shadow or a fill or some 3d perspective effect or whatever. So basically you should always be able to make a MWE being the drawing up to the point at which you need to ask a question, the end result of the question doesn't need to be an answer with a publication-quality plot, just something that illustrates one of the (many:-) dark corners of tikz

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .