Re: jupyter…

vincent douce <[email protected]> Wed, 16 Oct 2024 10:54:55 +0200
Newsgroups gmane.editors.texmacs.user
Message-ID <[email protected]>
hello Henri
the % is not recognized and provcks a syntax error

> Le 15 oct. 2024 à 18:54, Henri Girard <[email protected]> a écrit :
> 
> here it is :
> 
> %matplotlib notebook
> import matplotlib.pyplot as plt
> 
> import matplotlib
> import numpy as np
> import matplotlib.pyplot as plt
> %matplotlib inline  
> 
> theta=np.linspace(0,2*np.pi,100)
> x=np.cos(theta)
> y=np.sin(theta)
> fig,ax=plt.subplots()
> ax.plot(x,y)
> ax.set_aspect(1)
> plt.show
> 
> I got a blue circle
> 
> Next time put le python code because from an image I have to write it and I am not a good typist !
> 
> best
> 
> Henri
> 
> 
> Le 15/10/2024 à 17:26, vincent douce a écrit :
>> thanks Henri
>> the % is not recognized
>> 
>> 
>> 
>> <GraphiqueColl?-8.png>
>> 
>>> Le 15 oct. 2024 à 15:10, Henri Girard <[email protected] <mailto:[email protected]>> a écrit :
>>> 
>>> Sorry for not being clear :
>>> 
>>> In Jupyter notebook with python if we want a graphic embeded one just write at begining 
>>> 
>>> %matplotlib inline 
>>> 
>>> and all pictures will be inside jupyter and not outside 
>>> 
>>> 
>>> 
>>> Le 15/10/2024 à 10:36, vincent douce a écrit :
>>>> hello Henri
>>>> what do you mean ?
>>>> 
>>>>> Le 15 oct. 2024 à 10:13, Henri Girard <[email protected] <mailto:[email protected]>> a écrit :
>>>>> 
>>>>> have you tried %matplolib inline ?
>>>>> 
>>>>> Le 15/10/2024 à 10:11, vincent douce a écrit :
>>>>>> hello i have made a trial
>>>>>> 
>>>>>> 
>>>>>> %matplolib inline 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> my question are :
>>>>>> 
>>>>>> - créate a shortcut for « inserting session python » : maybe with my-init-texmacs ? and for « evaluate all », « evaluate below »…
>>>>>> - possible to cancel the display of >>> and instead change the typography of the chunks ? grey                                     background + size of the font more tiny ?
>>>>>> - some difficulties when inserting a chunk, to put the cursor after the chunk
>>>>>> 
>>>>>> 
>>>>>> remarks :
>>>>>> 
>>>>>> - summary : advantage to TeXmacs…
>>>>>> - pdf version : galactic advantage to TeXmacs…
>>>>>> 
>>>>>> other question :
>>>>>> 
>>>>>> 
>>>>>> (screenshot)
>>>>>> if i matplotlib some curve inside a python session : how to get the picture not in an external windows, but inside the TeXmacs document ?
>>>>>> Vincent
>>>>>> 
>>>>>> Vincent
>>>> 
>>