Is it possible to use color scheme and draw color bar in log scale?

17 views
Skip to first unread message

T X

unread,
Jul 17, 2022, 3:29:07 AM7/17/22
to MathGL

1.png
I would like to draw some thing like the Rosenbrock function ( z = 100(x^2-y)^2 + (x-1)^2) by MathGL with the z-axis, the color scheme, the color bar all in log scale.
However, I failed to find any instructions in the document about the log scale setting of color scheme etc. Is there any way to realise this purpose?

Alexey Balakin

unread,
Jul 17, 2022, 3:44:29 AM7/17/22
to mat...@googlegroups.com
Hi,

The color coordinate have the same feature as other (X-,Y-,Z-coordinates). You just need to set formula for the last (4th) C-coordinate in curved coordinates specification. The sample code is

ranges -2 2 -1 3
axis:box
new a 300 300 '100*(x^2-y)^2 + (x-1)^2'
crange  0.001 1000
axis '' '' '' 'ln(c)'             # <-- here
dens a 'Bgy'
colorbar 'Bgy'
cont [0.01,0.1,1,10,100] a 'w_'


14.07.2022 15:06, T X пишет:

1.png
I would like to draw some thing like the Rosenbrock function ( z = 100(x^2-y)^2 + (x-1)^2) by MathGL with the z-axis, the color scheme, the color bar all in log scale.
However, I failed to find any instructions in the document about the log scale setting of color scheme etc. Is there any way to realise this purpose?

--
You received this message because you are subscribed to the Google Groups "MathGL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathgl+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mathgl/ba88389a-1f96-4f1f-a10d-076a77aaad95n%40googlegroups.com.


-- 
Kind regards,
Alexey Balakin
Reply all
Reply to author
Forward
0 new messages