4

I have the following figure in Tikz, could you help me to make some parts of this figure more transparant? Something like the attached figures.
Image

\documentclass{standalone}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathrsfs,dsfont}
\usepackage{color}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{tikz}
\usepackage{verbatim}
\usetikzlibrary{shapes,arrows.meta,decorations, positioning, arrows.meta, calc, shapes.geometric}

\begin{document}

\begin{tikzpicture}[ font=\sf \scriptsize, >=LaTeX, cell/.style={rectangle, rounded corners=5mm, fill=green!15, draw,very thick,}, operator/.style={circle,draw,inner sep=-0.5pt,minimum height =0.5cm, fill=red!10, font = \large}, block/.style={draw, fill=blue!15, rectangle, minimum height=2em, minimum width=4em, font = \LARGE}, bl/.style={draw, fill=blue!15, rectangle, rotate=90, minimum height=2em, minimum width=4em, font = \LARGE} sum/.style={draw, fill=blue!15, circle, node distance=1cm}, input/.style={coordinate}, output/.style={coordinate}, dot/.style = {circle,fill, inner sep=0.01pt, node contents={}} function/.style={ellipse, draw,inner sep=1pt}, ct/.style={circle,draw,line width = .75pt,minimum width=1cm,inner sep=1pt,}, gt/.style={rectangle,draw,minimum width=4mm,minimum height=3mm,inner sep=1pt}, dot/.style = {circle,fill, inner sep=0.001mm, fill=black!15, node contents={}}, mylabel/.style={font=\scriptsize\sffamily}, ArrowC1/.style={rounded corners=.25cm,thick,}, ArrowC2/.style={rounded corners=.5cm,thick,}, ArrowC3/.style={rounded corners=.1cm,thick,}, dot/.style = {circle,fill, inner sep=0.01pt, node contents={}}, alr/.style = {Stealth-Stealth}, arr/.style = {-Stealth},] \node [cell, minimum height =4.5cm, minimum width=7.4cm] at (2.7,-1.7){} ; \node[operator, name = operator] {$\times$}; \node[operator, right = 3cm of operator ] (plus) {+}; \node[block, below = 2cm of operator] (kapa1) {$\kappa$}; \node[block, below = 2cm of plus] (kapa2) {$\tilde{\kappa}$}; \node[block, right = 0.35cm of kapa1] (kapa3) {$\kappa$}; \node[block, right = 0.35cm of kapa2] (kapa4) {$\kappa$}; \node[operator, above = 0.4cm of kapa4] (time2) {$\times$}; \node[operator, above = 0.7cm of kapa2 ] (times) {$\times$}; \node[block, above = 0.4cm of time2] (kapa5) {$\tilde{\kappa}$}; \node (dot1) [dot,below= 0.5cm of kapa1]{}; \node (dot2) [dot,below= 0.5cm of kapa2]{}; \node (dot3) [dot,below= 0.5cm of kapa3]{}; \node (dot4) [dot,below= 0.5cm of kapa4]{}; \node (dot5) [dot,left= 1.3cm of operator]{}; \node (dot6) [dot,left= 1.6cm of dot1]{}; \node (dot7) [dot,right= 0.6cm of time2]{}; \node (dot8) [dot,above= 2.8cm of dot7]{}; \node (dot9) [dot,left= 1cm of dot1]{}; \node[output, right = 3.21cm of plus] (ct) {$c(t)$}; \node (dot10) [dot,below= 0.8cm of dot9]{}; \node (dot11) [dot,left= 0.6cm of dot1]{}; \node[output, right = 0.8cm of dot7, font = \large] (h_t) {}; \draw[arr, line width=0.30mm] (kapa1) -- node[pos = 0.405, right, font = \Large]{$\varrho_t$}(operator); \draw[arr, line width=0.30mm] (kapa2) -- node[pos = 0.405, right, font = \Large]{$\tilde{c}t$}(times); \draw[arr, line width=0.30mm] (times) -- node[pos = 0.405]{}(plus); \draw[arr, line width=0.30mm] (kapa4) -- node[pos = 0.505, right, font = \Large]{$o_t$}(time2); \draw[arr, line width=0.30mm] (time2) -- node[pos = 0.405]{}(kapa5); \draw[arr, line width=0.30mm] (dot1) -- node[pos = 0.405]{}(kapa1); \draw[arr, line width=0.30mm] (dot2) -- node[pos = 0.405]{}(kapa2); \draw[arr, line width=0.30mm] (dot3) -- node[pos = 0.405]{}(kapa3); \draw[arr, line width=0.30mm] (dot4) -- node[pos = 0.405]{}(kapa4); \draw[ line width=0.30mm] (dot1) -- node{}(dot4); \draw[arr, line width=0.30mm] (operator) -- node{}(plus); \draw[arr, line width=0.30mm] (dot6) -| node{}(kapa4); \draw[arr, line width=0.30mm] (kapa3) |- node[pos = 0.505, above right, font = \Large]{$I_t$}(times); \draw[ line width=0.30mm] (dot6) |- node[above, font = \Large]{$c{t-1}$}(dot1); \draw[ line width=0.30mm] (dot5) |- node[pos = 0.405]{}(operator); \draw[ line width=0.30mm, red] (kapa5) |- node[pos = 0.405]{}(plus); \draw[ line width=0.30mm, red ] (kapa5) |- node[pos = 0.405]{}(plus); \draw[ arr, line width=0.30mm, ] (dot5) -- node[above left, font = \Large]{$h_{t-1}$}(operator); \draw[ line width=0.30mm] (time2) -- node[pos = 0.405]{}(dot7); \draw[arr, line width=0.30mm] (dot7) -- node[pos = 0.905, right, font = \Large]{$h_t$}(dot8); \draw[arr, line width=0.30mm] (time2) -- node[pos= 0.8,above right, font = \Large]{$h_t$}(h_t); \draw[ArrowC2, line width=0.30mm] (dot10) |- node[pos= -.16, , font = \Large]{$x_t$}(dot11); \draw[arr, line width=0.30mm, red] (kapa5) |- node[pos= 0.9,above right, font = \Large]{$c_t$}(ct); \end{tikzpicture}

\end{document}

Meskaj
  • 185
  • 7
  • Welcome to TeX.SE! Would this help!? – M. Al Jumaily Jun 24 '21 at 18:18
  • Thanks for the comment. It's a simple example and its only works for the cases where there is nothing the block. But I have a lot things on my block. – Meskaj Jun 24 '21 at 18:47
  • you do have lots of components. You can simply add opacity=0.2 to the components you would like to lower the opacity of. Also, I don't know which components you need to make less visible. Would you like to update the question!? – M. Al Jumaily Jun 24 '21 at 19:17
  • Thanks for your help. I've just update some part of the figure which I want to high light. I've shown them as red. Thanks – Meskaj Jun 24 '21 at 19:26
  • Ah, I can only see the top-right arrow with the text. Is there anything else? Also, would you like the red portion to be less visible? – M. Al Jumaily Jun 24 '21 at 19:30
  • Yes. only the top right is highlighted. No. The red part will be highlighted and the other less visible. – Meskaj Jun 24 '21 at 19:32
  • I took the liberty of rephrasing the title since I believe that you confuse "blurry" with "transparent". – Dr. Manuel Kuehner Jun 25 '21 at 01:34
  • @Dr.ManuelKuehner Thanks. Yes, your phrase is better:) – Meskaj Jun 25 '21 at 01:39

1 Answers1

4

Since most of the components needs to be less visible, add opacity=0.25 to the options of tikzpicture. This will make everything less visible. Now, individually go to the components that you would like to have them visible and add opacity=1. This will override the option of value 0.25. Output

\documentclass[border=1cm]{standalone}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathrsfs,dsfont}
\usepackage{color}
\usepackage{mathtools}
\usepackage{mathrsfs}
\usepackage{tikz}
\usepackage{verbatim}
\usetikzlibrary{shapes,arrows.meta,decorations, positioning, arrows.meta, calc, shapes.geometric}

\begin{document} \begin{tikzpicture}[ opacity=0.25, font=\sf \scriptsize, >=LaTeX, cell/.style={rectangle, rounded corners=5mm, fill=green!15, draw,very thick,}, operator/.style={circle,draw,inner sep=-0.5pt,minimum height =0.5cm, fill=red!10, font = \large}, block/.style={draw, fill=blue!15, rectangle, minimum height=2em, minimum width=4em, font = \LARGE}, bl/.style={draw, fill=blue!15, rectangle, rotate=90, minimum height=2em, minimum width=4em, font = \LARGE} sum/.style={draw, fill=blue!15, circle, node distance=1cm}, input/.style={coordinate}, output/.style={coordinate}, dot/.style = {circle,fill, inner sep=0.01pt, node contents={}} function/.style={ellipse, draw,inner sep=1pt}, ct/.style={circle,draw,line width = .75pt,minimum width=1cm,inner sep=1pt,}, gt/.style={rectangle,draw,minimum width=4mm,minimum height=3mm,inner sep=1pt}, dot/.style = {circle,fill, inner sep=0.001mm, fill=black!15, node contents={}}, mylabel/.style={font=\scriptsize\sffamily}, ArrowC1/.style={rounded corners=.25cm,thick,}, ArrowC2/.style={rounded corners=.5cm,thick,}, ArrowC3/.style={rounded corners=.1cm,thick,}, dot/.style = {circle,fill, inner sep=0.01pt, node contents={}}, alr/.style = {Stealth-Stealth}, arr/.style = {-Stealth},] \node [cell, minimum height =4.5cm, minimum width=7.4cm,opacity=1] at (2.7,-1.7){} ; \node[operator, name = operator] {$\times$}; \node[operator, right = 3cm of operator ] (plus) {+}; \node[block, below = 2cm of operator] (kapa1) {$\kappa$}; \node[block, below = 2cm of plus] (kapa2) {$\tilde{\kappa}$}; \node[block, right = 0.35cm of kapa1] (kapa3) {$\kappa$}; \node[block, right = 0.35cm of kapa2] (kapa4) {$\kappa$}; \node[operator, above = 0.4cm of kapa4] (time2) {$\times$}; \node[operator, above = 0.7cm of kapa2 ] (times) {$\times$}; \node[block, above = 0.4cm of time2] (kapa5) {$\tilde{\kappa}$}; \node (dot1) [dot,below= 0.5cm of kapa1]{}; \node (dot2) [dot,below= 0.5cm of kapa2]{}; \node (dot3) [dot,below= 0.5cm of kapa3]{}; \node (dot4) [dot,below= 0.5cm of kapa4]{}; \node (dot5) [dot,left= 1.3cm of operator]{}; \node (dot6) [dot,left= 1.6cm of dot1]{}; \node (dot7) [dot,right= 0.6cm of time2]{}; \node (dot8) [dot,above= 2.8cm of dot7]{}; \node (dot9) [dot,left= 1cm of dot1]{}; \node[output, right = 3.21cm of plus] (ct) {$c(t)$}; \node (dot10) [dot,below= 0.8cm of dot9]{}; \node (dot11) [dot,left= 0.6cm of dot1]{}; \node[output, right = 0.8cm of dot7, font = \large] (h_t) {}; \draw[arr, line width=0.30mm] (kapa1) -- node[pos = 0.405, right, font = \Large]{$\varrho_t$}(operator); \draw[arr, line width=0.30mm] (kapa2) -- node[pos = 0.405, right, font = \Large]{$\tilde{c}t$}(times); \draw[arr, line width=0.30mm] (times) -- node[pos = 0.405]{}(plus); \draw[arr, line width=0.30mm] (kapa4) -- node[pos = 0.505, right, font = \Large]{$o_t$}(time2); \draw[arr, line width=0.30mm] (time2) -- node[pos = 0.405]{}(kapa5); \draw[arr, line width=0.30mm] (dot1) -- node[pos = 0.405]{}(kapa1); \draw[arr, line width=0.30mm] (dot2) -- node[pos = 0.405]{}(kapa2); \draw[arr, line width=0.30mm] (dot3) -- node[pos = 0.405]{}(kapa3); \draw[arr, line width=0.30mm] (dot4) -- node[pos = 0.405]{}(kapa4); \draw[ line width=0.30mm] (dot1) -- node{}(dot4); \draw[arr, line width=0.30mm] (operator) -- node{}(plus); \draw[arr, line width=0.30mm] (dot6) -| node{}(kapa4); \draw[arr, line width=0.30mm] (kapa3) |- node[pos = 0.505, above right, font = \Large]{$I_t$}(times); \draw[ line width=0.30mm] (dot6) |- node[above, font = \Large]{$c{t-1}$}(dot1); \draw[ line width=0.30mm] (dot5) |- node[pos = 0.405]{}(operator); \draw[ line width=0.30mm, red, opacity=1] (kapa5) |- node[pos = 0.405]{}(plus); \draw[ line width=0.30mm, red, opacity=1 ] (kapa5) |- node[pos = 0.405]{}(plus); \draw[ arr, line width=0.30mm, ] (dot5) -- node[above left, font = \Large]{$h_{t-1}$}(operator); \draw[ line width=0.30mm] (time2) -- node[pos = 0.405]{}(dot7); \draw[arr, line width=0.30mm] (dot7) -- node[pos = 0.905, right, font = \Large]{$h_t$}(dot8); \draw[arr, line width=0.30mm] (time2) -- node[pos= 0.8,above right, font = \Large]{$h_t$}(h_t); \draw[ArrowC2, line width=0.30mm] (dot10) |- node[pos= -.16, , font = \Large]{$x_t$}(dot11); \draw[arr, line width=0.30mm, red, opacity=1] (kapa5) |- node[pos= 0.9,above right, font = \Large]{$c_t$}(ct); \end{tikzpicture} \end{document}

M. Al Jumaily
  • 4,035
  • 2
  • 11
  • 26