Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brainpy.analysis.LowDimAnalyzer cannot plot the nullcline that is absolutely horizontal #77

Open
c-xy17 opened this issue Mar 8, 2022 · 0 comments
Labels
brainpy.analysis issue belongs to brainpy.analysis module bug Something isn't working

Comments

@c-xy17
Copy link
Collaborator

c-xy17 commented Mar 8, 2022

import brainpy as bp

bp.math.enable_x64()


def ppa2d(group, title, v_range=None, w_range=None, Iext=65., duration=400):
	v_range = [-70., -40.] if not v_range else v_range
	w_range = [-10., 50.] if not w_range else w_range

	# 使用BrainPy中的相平面分析工具
	phase_plane_analyzer = bp.analysis.PhasePlane2D(
		model=group,
		target_vars={'V': v_range, 'w': w_range},  # 待分析变量
		pars_update={'Iext': Iext},  # 需要更新的变量
		resolutions=0.05
	)

	# 画出V, w的零增长曲线
	phase_plane_analyzer.plot_nullcline()
	# 画出固定点
	phase_plane_analyzer.plot_fixed_point()
	# 画出向量场
	phase_plane_analyzer.plot_vector_field(plot_style=dict(color='lightgrey', density=1.))

	# ... (some codes are not shown)

	plt.xlim(v_range)
	plt.ylim(w_range)
	plt.title(title)
	plt.show()

ppa_tonic_spiking_bugs

@c-xy17 c-xy17 added the bug Something isn't working label Mar 8, 2022
@chaoming0625 chaoming0625 added the brainpy.analysis issue belongs to brainpy.analysis module label Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainpy.analysis issue belongs to brainpy.analysis module bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants