Skip to content

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

Open
@c-xy17

Description

@c-xy17
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    brainpy.analysisissue belongs to brainpy.analysis modulebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions