
- Желаемое изображение похоже на следующее:
- Код для изображения не полностью соответствует показанному изображению
- Моя проблема в том, как изменить показанный код, который будет воспроизводить показанное изображение.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{csvsimple}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{relsize}
\usepackage{graphicx}
\usepackage{rotating}
\usepackage[T1]{fontenc}
\title{table try}
\author{Jof Frimpong}
\date{October 2022}
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{statistics}
\usepgfplotslibrary{fillbetween}
\begin{document}
\maketitle
\section{Introduction}
\begin{table}[H]
\centering
\csvautotabular[]{latextry.csv}
\end{table}
\begin{center}
\begin{tikzpicture}
% \draw[](0,0) grid (5,5)
\node[draw](a) at (0,0){Audit Fees};
\node[draw](b) at (9,0){Profitability};
\node[draw](c) [below of =a]{Audit Tenure};
\node[draw](d) [below right of =b]{liquidity};
\node[draw](e) [below of =c]{firm size};
\node[draw](f) at (0,-6){Board Size};
\node[draw,fill=blue,text=white,shape=circle](g) at (5,0){\huge Audit Qualtiy};
\draw[-latex](a) to (g);
\draw[stealth-](c) to (g);
\draw[line width=3pt][-{stealth [scale width=2]}](d) to (g);
\draw[line width=3pt][-latex](f) to (g);
\end{tikzpicture}
\end{center}
\end{document}
решение1
После болезненного выдергивания, что вы после ... кажется, вы ищете следующее:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
calc, chains,
decorations.pathreplacing,
calligraphy,
positioning,
shapes}
\begin{document}
\begin{figure}[ht]
\centering
\begin{tikzpicture}[
node distance = 5mm and 16mm,
start chain = going below,
arr/.style = {-Stealth, very thick, color=cyan},
BC/.style args = {#1/#2}{decorate,
decoration={calligraphic brace, amplitude=6pt,
pre =moveto, pre length=1pt,
post=moveto, post length=1pt,
raise=#1, mirror},
ultra thick,
pen colour={#2}},
BCL/.style args = {#1/#2}{draw=#1, rounded corners,
semithick, below=#2},
E/.style = {ellipse, draw=cyan, semithick,
fill=cyan!30, font=\Large\bfseries},
N/.style = {draw=cyan, semithick, minimum width = 8em, inner sep=1ex}
]
\begin{scope}[nodes={N, on chain}]
\node (a) {text};
\node (b) {text};
\node (c) {text};
\node (d) {text};
\end{scope}
\node (e) [E, left= of {$(b.west)!0.5!(c.west)$}] {TEXT};
%
\node (f) [N, left=of e.west |- a] {text};
\node (g) [N, left=of e.west |- d] {text};
%
\foreach \i [count=\j]in {a,b,c,d, f,g}
{
\ifnum\j<5
\draw[arr] (\i.west) -- (e);
\else
\draw[arr] (\i.east) -- (e);
\fi
}
%
\begin{scope}[nodes={BCL=orange/5mm}]
\draw[BC=3pt/orange] (g.south west)
-- node {text}
(g.south east);
\draw[BC=3pt/orange] (e.west |- d.south)
-- node {text}
(e.east |- d.south);
\draw[BC=3pt/orange] (d.south west)
-- node {text}
(d.south east);
\end{scope}
\end{tikzpicture}
\end{figure}
\end{document}
приложение:
- Как я и опасался, показанное изображение упрощено... окончательный образ отличается (опять же= :-)
- Желаемые изображения имеют на левой стороне семь узлов и на правой стороне пять
- Эти изменения можно легко осуществить, внеся следующие изменения в первую версию ответа:
- определение двух узлов chanis )L и R), один для левой стороны, а другой для правой стороны
- рисуем сначала левую цепь, затем средний узел и, наконец, правую цепь
- по-прежнему предполагается, что текст в узлах цепочек представляет собой одну строку и короче или равен
8em
- цепочка имен (
L
для левой стороны,R
для правой стороны); благодаря этому код становится немного короче и проще:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
chains,
decorations.pathreplacing,
calligraphy,
positioning,
shapes}
\begin{document}
\begin{figure}[ht]
\centering
\begin{tikzpicture}[
node distance = 5mm and 16mm,
start chain = L going below, % added chain name, for leftside chain
start chain = R going below, % new chain, for rightside
arr/.style = {-Stealth, very thick, color=cyan},
BC/.style args = {#1/#2}{decorate,
decoration={calligraphic brace, amplitude=6pt,
pre =moveto, pre length=1pt,
post=moveto, post length=1pt,
raise=#1, mirror},
ultra thick,
pen colour={#2}},
BCL/.style args = {#1/#2}{draw=#1, rounded corners,
semithick, font=\scshape,
align=center, below=#2},
E/.style = {ellipse, draw=cyan, semithick,
fill=cyan!30, font=\Large\bfseries,
align=center},
N/.style = {draw=cyan, semithick, minimum width = 8em,
align=center, inner sep=1ex}
]
\begin{scope}[nodes={N, on chain=L}] % leftside chain of 7 nodes
\node {text L1}; % node name: L-1
\node {text L2};
\node {text L3};
\node {text L4};
\node {text L5};
\node {text L6};
\node {text L7};
\end{scope}
\node (e) [E, right= of L-4] {TEXT\\ TEXT};
%
\begin{scope}[nodes={N, on chain=R}] % rightside chain of 5 nodes
\node [right=of L-2 -| e.east]
{text R1}; % node name: R-1
\node {text R2};
\node {text R3};
\node {text R4};
\node {text R5};
\end{scope}
%
\foreach \i in {1, 2,...,7}
\draw[arr] (L-\i.east) -- (e);
\foreach \i in {1, 2,...,5}
\draw[arr] (R-\i.west) -- (e);
%
\begin{scope}[nodes={BCL=orange/5mm}]
\draw[BC=3pt/orange] (L-7.south west)
-- node {left side\\ nodes}
(L-7.south east);
\draw[BC=3pt/orange] (e.west |- L-7.south)
-- node {text}
(e.east |- L-7.south);
\draw[BC=3pt/orange] (R-5.west |- L-7.south)
-- node {right side\\ nodes}
(R-5.east |- L-7.south);
\end{scope}
\end{tikzpicture}
\end{figure}
\end{document}