uhrwecker / GRDonuts

Toolkit for creating plots and computing stable equipotential surfaces of fluids orbiting a compact stellar object (see Zarotti: Relativistic Hydrodynamics))
MIT License
0 stars 0 forks source link

Graphical visualization of two parameter variation #20

Closed uhrwecker closed 4 years ago

uhrwecker commented 4 years ago

add graphical visualoization of a two parameter variation, related to Issue #18

uhrwecker commented 4 years ago

Code snippet: k = QMetric(r_range=(2, 30), verbose=False) matrix = k.two_parameter_variation_stability_test('q', (-5, 5), 'l', (0, 15), num1=500, num2=500) print(matrix) pl.imshow(matrix)

def format_func(value, tick_number): return str(value*15/100)[:4]

def ff(value, tick_number): return str(-5+value*5/50)[:4]

ax = pl.gca() ax.xaxis.set_major_formatter(pl.FuncFormatter(format_func)) ax.yaxis.set_major_formatter(pl.FuncFormatter(ff)) pl.xlabel('l') pl.ylabel('q') pl.xlim(0, 500) pl.ylim(0, 500) pl.show()

uhrwecker commented 4 years ago

Done. Merged.