필터 지우기
필터 지우기

filled contour no longer creates patch children ... what is equivalent for setting the ZData?

조회 수: 3 (최근 30일)
I have a method for plotting the coastlines under or on top of some 3D scatter data, depending on whether the z levels are depth, pressure, or height. It used to grab the children of the contourf object and set the ZData property - independent of the actual values of the contourf object. This worked great until 2014b (?) and certainly doesn't work for 2015b ... I have not tried all versions. Attached is a short example - if you run it with 2014a or before, it works fine. 2015b fails - there are no patch objects generated by the contourf.
I have tried shifting the contourf z data to center the contour at the desired level, that did not work.

채택된 답변

Walter Roberson
Walter Roberson 2016년 2월 1일
There is no equivalent mechanism now :( Parent a contourf() against an hgtransform that uses a translation along the Z axis of the desired Z value. You might need to do that for each distinct Z value.
  댓글 수: 4
Tim
Tim 2016년 2월 1일
Thanks to Mike as well. I was so preoccupied implementing and then tweaking my example script that I did not read Mike's post in a timely fashion. Mike - for the record - I just pared down a much more complicated example for the purposes of clarity. My full-blown function does handle the data limits and clipping appropriately. Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by