This work proposes a cyber-physical-social system (CPSS) framework for smart factories which associates the social-network-based physical factory circumference with the cyber control through a visualization interface based on NodeTrix. The NodeTrix representation consisting of adjacency matrices and node-link diagrams has been popularly used in social network analysis. Different from previous works on NodeTrix based on square-shaped matrices, the proposed NodeTrix applies triangle-shaped matrices for visualizing overlapping communities to save the displaying space, and a simulated annealing algorithm is used to reduce the crossings among links and communities. In the CPSS for smart factories, working-in-process (WIP) products are categorized according to their attributes, and are placed at different storage locations for later different production processes. By the NodeTrix-based interface for CPSS, when users with different domains and experiences work together to make instant decisions on production and logistics, the physical production environment will be adjusted accordingly and immediately through technological support of Industry 4.0. Through the interface, the information on locations, parameters, and interoperability of WIP products can be visualized and adjusted in time. By comparison with other works, the proposed representation looks promising in displaying social networks for the CPSS with fewer crossings within a smaller screen space.