https://bugs.kde.org/show_bug.cgi?id=469939
--- Comment #1 from Alexander Semke <alexander.se...@web.de> --- (In reply to YOYOWORKOUT from comment #0) > Created attachment 159068 [details] > picture of the SyntaxError (in virtualenvironment) > > SUMMARY > *** > When using matplotlib and ipython installed both in virtual environment by > disto repos, the command %matplotlib inline raises "SyntaxError: invalid > syntax " > *** > > > STEPS TO REPRODUCE > 1. install dependencies : apt install -y > python3-{matplotlib,numpy,notebook,ipykernel} > 2. create a LabPlot project, add new notebook in it > 3. import numpy, matplotlib : is ok > 4. in a command cell : insert '%matplotlib inline' > > OBSERVED RESULT > File "/home/yoyo/Downloads/PyDataScience.lml", line 1 > %matplotlib inline > ^ > SyntaxError: invalid syntax This 'inline' command is from ipython. In Cantor you don't need to use it, we rely on python only. With the option "Plot Integration" you can control where the produce plot result is opened in the external viewer used by matplotlib, etc. or embedded into Cantor's notebook. The following example should work: import matplotlib.pyplot as plt import numpy as np t = np.arange(0,2*np.pi, 0.1) x = 16*np.sin(t)**3 y = 13*np.cos(t)-5*np.cos(2*t)-2*np.cos(3*t)-np.cos(4*t) plt.plot(x,y) plt.show() I just tried it and saw the produce plot is not properly embedded if the plot integration option is activated :-( But this must be a different problem. Please give it a try without any ipython specific keywords. -- You are receiving this mail because: You are watching all bug changes.