On Monday, May 4, 2020 at 1:31:06 AM UTC+8, David Bremner wrote:
>
>
> Does anyone know how to achieve plots like the attached with racket's 
> plot module? I'm stuck trying to invert the y axis. I'd like the smaller 
> y values to be at the top of the plot. 
>
>
I am not aware of any plot parameter which would allow flipping the axis, 
but you can transform the data to be flipped and use an axis transform for 
the axis itself.  I wrote a blog post which is somewhat related: 
https://alex-hhh.github.io/2020/02/dual-axis-plots.html, the post covers 
plotting a second data series which has a different scale than the first. 
The same technique of making "guest" transforms can be used to flip an 
axis: you would call 
(make-guest-transform base-min base-max base-max base-min) to obtain the 
"flip" transform and only plot the "guest" which would be flipped.

Hope this helps,
Alex.



-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/ace9b069-8454-4d50-8ed1-547ecad38cc0%40googlegroups.com.

Reply via email to