Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have this code, and would like to know how to group many nodes.

enter image description here

How to do it?

I prefer grouping nodes calling nodes by name but... if it´s not possible, I was thinking about coding any similar to

\pstriangle[linestyle=dashed,linecolor=red,linewidth=0.1cm,framearc=0.2](0,-1.9)(4.8,4.8)

with the option "linearc=0.2"

My code

\documentclass[pstricks,border=12pt]{article}
\usepackage{pstricks,pst-node,pst-blur}
\usepackage[utf8]{inputenc}
\usepackage{eurosym}

\newpsobject{cnodeblue}{cnode}{fillstyle=solid,fillcolor=blue}
\newpsobject{cnodepink}{cnode}{fillstyle=solid,fillcolor=pink}
\newpsobject{cnodegreen}{cnode}{fillstyle=solid,fillcolor=green}
\newpsobject{psframegray}{psframe}{fillcolor=lightgray,linestyle=none,shadow,blur}

\definecolor{azultenue}{RGB}{65,170,193}
\definecolor{rojotenue}{RGB}{192,2,3}
\definecolor{naranjatenue}{RGB}{241,101,35}

\begin{document}
\psset{framearc=0.2, shadowcolor=black!70, shadowangle=-90, unit=1.0cm,nodesep=0.12cm}
%
\def\pscolhookii{\hskip 1cm}
\def\pscolhookiii{\hskip 1cm}
\begin{psmatrix}[rowsep=2.2, colsep=5.8]% defines the distance between two frames
 [name=Inicio] 
 \psframegray(-2.5,-2.5)(2.5,2.5)
%
 \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}
%
 \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}
 \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}
%
 \psdots[dotsize=0.06](0.1,-1)
 \psdots[dotsize=0.06](0.4,-1)
 \psdots[dotsize=0.06](0.7,-1)
%
 \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}
%
 \ncline[arcangle=0]{->}{p1}{c1}
 \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$}}
%
 \ncline[arcangle=0]{->}{p1}{c2}
 \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }
%
 \ncline[arcangle=0]{->}{p1}{cl}
 \nbput[nrot=:U,labelsep=0.075cm]{\small{$ \omega_{mut}$} }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
&[name=Conjunto]
\psframegray(-2.5,-2.5)(2.5,2.5)
%
 \rput(0,1.5){\circlenode[fillstyle=solid,fillcolor=azultenue]{p1}{\textcolor{black}{$p_1$}}}
%
 \rput(-1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c1}{\textcolor{black}{$c_1$}}}
 \rput(-0.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{c2}{\textcolor{black}{$c_2$}}}
%
 \psdots[dotsize=0.06](0.1,-1)
 \psdots[dotsize=0.06](0.4,-1)
 \psdots[dotsize=0.06](0.7,-1)
%
 \rput(1.5,-1){\circlenode[fillstyle=solid,fillcolor=naranjatenue]{cl}{\textcolor{black}{$c_\lambda$}}}
 \ncarcbox[nodesep=.2cm,boxsize=.4,linearc=.4,linecolor=red,linestyle=dashed]{<->}{p1}{c1}{c2}{cl}
\rput(0,-1.8){Evalución de Aptitud}
\rput(0,-2.25){de padres e hijos}

 \end{psmatrix}
\end{document} 
share|improve this question

1 Answer 1

up vote 5 down vote accepted

use

\pspolygon[linearc=0.2,linestyle=dashed,linecolor=blue]%
  ([offset=10mm,nodesep=-4mm]p1)([offset=-5mm,nodesep=-13mm]c1)([offset=-5mm,nodesep=8mm]cl)

enter image description here

share|improve this answer
    
Thank you, I have coded \pstriangle[fillstyle=solid,fillcolor=gris135,linestyle=dashed,linecolor=red,lin‌​ewidth=0.06cm,linearc=0.4](0,-1.56)(5.0,4.2) and I like it, but.. Are there any option to grouping ... refering to many nodes? –  Mika Ike May 31 at 11:56
1  
With \pspolygon you can use as may nodes as you like and fillstyle also works. –  Herbert May 31 at 12:32
    
Thank you. Finally I have use that, with a darker gray –  Mika Ike May 31 at 12:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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