The Core Plot library is not compatible with SwiftUI.
Using the concept of NSViewRepresentable
, CorePlot
can be integrated in SwiftUI
.
For an explanation of the necessary steps to reproduce this see Integration CorePlot in SwiftUI on MacOS.
Note: this code does not successfully update the plot.