1

I am a beginner with regard to drawing pictures with TikZ. I know how to draw some basic lines, however, I am not sure how to incline lines and text (c. my picture). The top line is meant to be inclined as well and ends with an arrow. Thank you for your help in advance Making a plot with inclined lines

  • 2
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please add a minimal working example (MWE) of what have you tried so far. – CarLaTeX Oct 9 '17 at 19:38
  • Welcome to TeX.SX! To extend CarLaTe's answer, yes, this can be done using pstricks or tikz, for example, but I have to warn you that questions of the form "Please draw this for me", which show no effort on the part of OP, often don't get answered. You will get more help if you post some code showing what you have tried and give a minimal working example. A quick search on TeX.SX for drawing functions (with tikz or pstricks) will give you an idea of where to start from. – Andrew Oct 9 '17 at 21:09
4

A partial solution, to show you a method.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}
\vspace*{2cm}
\begin{center}
\begin{tikzpicture}[]
\draw[->](0,-1)--(0,4);
\draw[->](0,-1)--(4,-1);
  \draw [decorate,decoration={snake, segment length=5mm, amplitude=10mm}]
    (0,0)  --  (4,0);

\end{tikzpicture}
\end{center}
\end{document}

enter image description here

  • 1
    I have changhed all my code. Sorry for similar answer. What do you think? – Sebastiano Oct 19 '17 at 19:00
  • @Sebastiano I think that now your answer should be the accepted one. – Przemysław Scherwentke Oct 19 '17 at 19:07
  • For your opionion my answer now is bad or good Thanks a lot, – Sebastiano Oct 19 '17 at 19:41
2

I have changed all my MWE and I'm sorry to you and to everbody for my similar answer. I hope that this is very nice of the last. It is similar at the figure of OP's question.

enter image description here

\documentclass{article}
\usepackage{tikz,amsmath, amssymb,bm,color}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{calc}
\usetikzlibrary{snakes}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
\draw[->] [thick](-0.2,0) -- (6,0) node[right] {\Large $x$};
\draw[->] [thick] (0,-6) -- (0,6) node[left] {\Large $y$};
\draw[->][line width=2.pt,color=magenta,smooth,samples=50,domain=.:4.8] plot(\x,{4.0*sin((4.0*(\x))*180/pi)+4.0});
\draw[line width=.75pt] plot coordinates {(-.3,-1)(.3,-.5)};
\draw (.3,-.75) -- (6,-.75);
\draw[line width=.75pt] plot coordinates {(-.3,-4)(.3,-3.45)};
\draw (0.3,-3.75) -- (6,-3.75);
\node [cross out,draw=black] at (-.75,-.75){\phantom{a}};
\node [cross out,draw=black] at (-.75,-3.8){\phantom{a}};
\draw (3.75,-.75) circle (0.3);
\fill [black] (3.75,-3.75) circle (0.3);
\draw [<-,snake=snake,
segment amplitude=2mm,
segment length=2mm,
line before snake=4mm] (5,-3.2) -- (6,-1);
\draw[rotate=-25] (5.5,-1) node[transform shape] {\phantom A}
(6.5,1.4) node[transform shape,rotate=90,scale=1.5] {foo};
\draw [-To, line width=2pt] (4.5,-3.75) -- (4.5,-.75);
\end{tikzpicture}
\end{document}
  • Similar, but closer to OP's request, so from my point of view +1. – Przemysław Scherwentke Oct 10 '17 at 12:56
  • When I have a bit of time I will change my code. Excuse me. I vote your answer. – Sebastiano Oct 10 '17 at 20:20
  • Firstly, thank you very much, this was exactly the part I did not know how to draw. So both answers are fine to me (and i upvoted them). Secondly, I will try to incline those lines and hopefully will not encounter any difficulties. If so, I'll mark the answer as answered or otherwise I'll have to come back to you guys ;). Cheers – JimmyPop Oct 12 '17 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.