Skip to main content
6 of 10
added 101 characters in body
Xuemei
  • 1.7k
  • 7
  • 10

plot and sum colors of the common region in hyper-graph?

I have two hypergraphs which shares one vertex (HypergraphPlot function from Jaebum Jung's hypergraph plotting):

fig1 = HypergraphPlot[{{Subscript[d, 1], Subscript[d, 2]}, {Subscript[d, 1], Subscript[d, 3]}}, "SubsetBoundaryStyle" -> (Directive[EdgeForm[{Thickness[0.003], Black}], #] & /@ {Green, Red}), "SubsetBoundaryScale" -> {2, 2, 2, 2}, "SubsetEdge" -> False, PlotTheme -> "Classic"] 

So the plot figure is fig1 as the following:

fig1

I want to know how to show the overlap region and summing the color in the common regions such as fig2 (red + green ~ yellow)?

fig2

The stupid way I do is to draw one more additional hypergraph that only contains the common vertex and with the summed color -- this will show the region but in a manually way such as:

HypergraphPlot[{{Subscript[d, 1], Subscript[d, 2]}, {Subscript[d, 1], Subscript[d, 3]}, {Subscript[d, 1], Subscript[d, 1]}}, "SubsetBoundaryStyle" -> (Directive[EdgeForm[{Thickness[0.003], Black}], #] & /@ {Red, Green, Yellow}), "SubsetBoundaryScale" -> {2, 2, 2, 2}, "SubsetEdge" -> False, PlotTheme -> "Classic"] 

Thank you very much in advance! If something is unclear, thank you for pointing out!

Xuemei
  • 1.7k
  • 7
  • 10