2

I have this simple program here

import numpy as np 
import matplotlib.pyplot as plt 

num_of_intervals = 2000
x = np.linspace(-10,10,num=num_of_intervals)

y_inputs = 1/(1+np.exp(-x)) # SIGMOID FUNCTION

plt.figure(figsize = (15,9))
plt.plot(x,y_inputs,label = 'Sigmoid Function')
plt.vlines(x=0, ymin = min(y_inputs), ymax=max(y_inputs), linestyles='dashed')
plt.title('Sigmoid Function')
plt.show()

When the above program is ran in the vscode terminal. The plot cannot be seen (usually a pop-up window appears showing the plot).

But when the program is ran in the Ubuntu terminal, the plot can be seen as a pop-up window.

Any idea how I can solve this issue with vscode.

OS : Ubuntu 20.04

Visual Studio Code 1.54.3

Python : 3.8.5

1 Answer 1

1

Double check that this option is turned on in Settings: terminal.integrated.inheritEnv

Sign up to request clarification or add additional context in comments.

1 Comment

Thankyou so much ... Now it's perfectly working as expected

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.