LaTeX forum ⇒ Graphics, Figures & Tablestikz does not show arc Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

tikz does not show arc

Postby paulosousa » Tue Apr 12, 2016 3:49 pm

Hello all,
need some assistance since the arc I need the angle ABC, noted x, does not show. What it's wrong?

  1. \definecolor{qqqqff}{rgb}{0.,0.,1.}
  2.  
  3. \begin{tikzpicture}[scale=0.70,line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
  4. \clip(0.5,0.175) rectangle (9.5,5.5);
  5. \fill(1.,5.) -- (1.,1.) -- (5.,1.) -- (9.,1.) -- cycle;
  6. \draw [shift={(9.,1.)},color=blue,fill=blue,fill opacity=0.1] (0,0) -- (153.44:0.6) arc (153.44:180.:0.6) -- cycle;
  7. \fill[color=qqqqff,fill=qqqqff,fill opacity=0.95] (1.,5.) -- (5.,3.) -- (5.,1.) -- (1.,1.) -- cycle;
  8. \fill[color=white,fill=white,fill opacity=1] (5.,1.) -- (9.,1.) -- (5.,3.) -- cycle;
  9. \draw (1.,5.)-- (1.,1.);
  10. \draw (1.,1.)-- (5.,1.);
  11. \draw (5.,1.)-- (9.,1.);
  12. \draw (9.,1.)-- (1.,5.);
  13. \draw (5.,3.)-- (5.,1.);
  14. \draw (6.80,2.60) node[anchor=north west] {\scriptsize $2$};
  15. \draw (4.65,0.65) node[anchor=north west] {\scriptsize $4$};
  16. \draw [thick, ->, >=stealth,line width=0.4pt] (5.20,0.30) -- (9.03,0.30);
  17. \draw [thick, ->, >=stealth,line width=0.4pt] (4.74,0.30) -- (0.95,0.30);
  18. \draw [color=qqqqff] (1.,5.)-- (5.,3.);
  19. \draw [color=qqqqff] (5.,3.)-- (5.,1.);
  20. \draw [color=qqqqff] (5.,1.)-- (1.,1.);
  21. \draw [color=qqqqff] (1.,1.)-- (1.,5.);
  22. \begin{scriptsize}
  23. \draw [fill=qqqqff] (1.,1.) circle (0.5pt);
  24. \draw[color=qqqqff] (0.93,0.75) node {\scriptsize $A$};
  25. \draw [fill=qqqqff] (9.,1.) circle (0.5pt);
  26. \draw[color=qqqqff] (9.1,0.75) node {\scriptsize $B$};
  27. \draw [fill=qqqqff] (1.,5.) circle (0.5pt);
  28. \draw[color=qqqqff] (0.99,5.24) node {\scriptsize $C$};
  29. \draw [fill=qqqqff] (5.,1.) circle (0.5pt);
  30. \draw[color=qqqqff] (5,0.75) node {\scriptsize $E$};
  31. \draw [fill=qqqqff] (5.,3.) circle (0.5pt);
  32. \draw[color=qqqqff] (5.0,3.2) node {\scriptsize $D$};
  33. \draw[color=black] (7.5,1.35) node {\scriptsize $x$};
  34. \end{scriptsize}
  35. \end{tikzpicture}

Tags:

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Thu Apr 14, 2016 5:32 pm

Can you complete your code snippet to a complete compilable document (a Infominimal working example), please?

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Postby paulosousa » Thu Apr 14, 2016 6:53 pm

Clemens,

  1. \documentclass[12pt, twoside, a4paper]{article}
  2. \usepackage[portuguese]{babel}
  3. \usepackage[applemac]{inputenc}
  4. \usepackage[left=2.0cm,top=1.5cm,right=2.0cm,bottom=1.75cm]{geometry}
  5. \usepackage{amsmath,amssymb,amsfonts,mathrsfs,textcomp,setspace,graphicx,color,xcolor,enumerate,environ,tabularx}
  6. \usepackage{pgf,tikz}
  7. \usetikzlibrary{arrows}
  8. \usetikzlibrary{through,calc}
  9. \usepackage{graphics, tikz, tkz-berge}
  10.  
  11. \definecolor{qqqqff}{rgb}{0.,0.,1.}
  12.  
  13. \begin{document}
  14. \begin{tikzpicture}[scale=0.70,line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]
  15. \clip(0.5,0.175) rectangle (9.5,5.5);
  16. \fill(1.,5.) -- (1.,1.) -- (5.,1.) -- (9.,1.) -- cycle;
  17. \draw [shift={(9.,1.)},color=blue,fill=blue,fill opacity=0.1] (0,0) -- (153.44:0.6) arc (153.44:180.:0.6) -- cycle;
  18. \fill[color=qqqqff,fill=qqqqff,fill opacity=0.95] (1.,5.) -- (5.,3.) -- (5.,1.) -- (1.,1.) -- cycle;
  19. \fill[color=white,fill=white,fill opacity=1] (5.,1.) -- (9.,1.) -- (5.,3.) -- cycle;
  20. \draw (1.,5.)-- (1.,1.);
  21. \draw (1.,1.)-- (5.,1.);
  22. \draw (5.,1.)-- (9.,1.);
  23. \draw (9.,1.)-- (1.,5.);
  24. \draw (5.,3.)-- (5.,1.);
  25. \draw (6.80,2.60) node[anchor=north west] {\scriptsize $2$};
  26. \draw (4.65,0.65) node[anchor=north west] {\scriptsize $4$};
  27. \draw [thick, ->, >=stealth,line width=0.4pt] (5.20,0.30) -- (9.03,0.30);
  28. \draw [thick, ->, >=stealth,line width=0.4pt] (4.74,0.30) -- (0.95,0.30);
  29. \draw [color=qqqqff] (1.,5.)-- (5.,3.);
  30. \draw [color=qqqqff] (5.,3.)-- (5.,1.);
  31. \draw [color=qqqqff] (5.,1.)-- (1.,1.);
  32. \draw [color=qqqqff] (1.,1.)-- (1.,5.);
  33. \begin{scriptsize}
  34. \draw [fill=qqqqff] (1.,1.) circle (0.5pt);
  35. \draw[color=qqqqff] (0.93,0.75) node {\scriptsize $A$};
  36. \draw [fill=qqqqff] (9.,1.) circle (0.5pt);
  37. \draw[color=qqqqff] (9.1,0.75) node {\scriptsize $B$};
  38. \draw [fill=qqqqff] (1.,5.) circle (0.5pt);
  39. \draw[color=qqqqff] (0.99,5.24) node {\scriptsize $C$};
  40. \draw [fill=qqqqff] (5.,1.) circle (0.5pt);
  41. \draw[color=qqqqff] (5,0.75) node {\scriptsize $E$};
  42. \draw [fill=qqqqff] (5.,3.) circle (0.5pt);
  43. \draw[color=qqqqff] (5.0,3.2) node {\scriptsize $D$};
  44. \draw[color=black] (8,1.20) node {\scriptsize $x$};
  45. \end{scriptsize}
  46. \end{tikzpicture}
  47. \end{document}


cgnieder wrote:Can you complete your code snippet to a complete compilable document (a Infominimal working example), please?

Regards

User avatar
cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Thu Apr 14, 2016 7:46 pm

You're painting over the arc. Change the order:

  1. \fill(1.,5.) -- (1.,1.) -- (5.,1.) -- (9.,1.) -- cycle;
  2. \fill[color=qqqqff,fill=qqqqff,fill opacity=0.95] (1.,5.) -- (5.,3.) -- (5.,1.) -- (1.,1.) -- cycle;
  3. \fill[color=white,fill=white,fill opacity=1] (5.,1.) -- (9.,1.) -- (5.,3.) -- cycle;
  4. \draw [shift={(9.,1.)},color=blue,fill=blue,fill opacity=0.1] (0,0) -- (153.44:0.6) arc (153.44:180.:0.6) -- cycle;


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Postby paulosousa » Thu Apr 14, 2016 8:19 pm

All perfect now, Clemens
Thanks a lot for your help.

Do you have any 'magic' solution to break very long lines in matlab?
viewtopic.php?f=47&t=27315


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 8 guests