给轴和刻度线标记优先于绘制线

时间:2018-03-29 13:02:51

标签: matlab plot

Matlab中的默认绘图行为是用要绘制的线覆盖轴和刻度线。例如,在原点附近的下图中,x轴被覆盖,0.004的刻度标记也被覆盖。

有没有办法让轴和刻度线优先于绘制的线?

enter image description here

1 个答案:

答案 0 :(得分:4)

将轴public class ToDoList extends Fragment implements BatListener, OnItemClickListener, OnOutsideClickedListener { private BatRecyclerView mRecyclerView; private BatAdapter mAdapter; private List<BatModel> mGoals; private BatItemAnimator mAnimator; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate(R.layout.todo_list_fragment, null); return root; } public void onViewCreated(View view, Bundle savedInstanceState) { // you can add listener of elements here /*Button mButton = (Button) view.findViewById(R.id.button); mButton.setOnClickListener(this); */ // Navigator FoldingTabBar tabBar = (FoldingTabBar) view.findViewById(R.id.folding_tab_bar); tabBar.setOnFoldingItemClickListener(new FoldingTabBar.OnFoldingItemSelectedListener() { @Override public boolean onFoldingItemSelected(@NotNull MenuItem item) { switch (item.getItemId()) { case R.id.menu_profile: Intent intent0 = new Intent(ToDoList.this, Home.class); startActivity(intent0); break; case R.id.menu_todo: break; case R.id.menu_schedule: Intent intent1 = new Intent(ToDoList.this, TimeTable.class); startActivity(intent1); break; case R.id.menu_settings: break; } return false; } }); ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar); ((TextView) view.findViewById(R.id.text_title)).setTypeface(TypefaceUtil.getAvenirTypeface(this)); mRecyclerView = (BatRecyclerView) view.findViewById(R.id.bat_recycler_view); mAnimator = new BatItemAnimator(); mRecyclerView.getView().setLayoutManager(new LinearLayoutManager(this)); mRecyclerView.getView().setAdapter(mAdapter = new BatAdapter(mGoals = new ArrayList<BatModel>() {{ }}, this, mAnimator).setOnItemClickListener(this).setOnOutsideClickListener(this)); ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new BatCallback(this)); itemTouchHelper.attachToRecyclerView(mRecyclerView.getView()); mRecyclerView.getView().setItemAnimator(mAnimator); mRecyclerView.setAddItemListener(this); view.findViewById(R.id.root).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { mRecyclerView.revertAnimation(); } }); } @Override public void add(String string) { mGoals.add(0, new Goal(string)); mAdapter.notify(AnimationType.ADD, 0); } @Override public void delete(int position) { mGoals.remove(position); mAdapter.notify(AnimationType.REMOVE, position); } @Override public void move(int from, int to) { if (from >= 0 && to >= 0) { mAnimator.setPosition(to); BatModel model = mGoals.get(from); mGoals.remove(model); mGoals.add(to, model); mAdapter.notify(AnimationType.MOVE, from, to); if (from == 0 || to == 0) { mRecyclerView.getView().scrollToPosition(Math.min(from, to)); } } } @Override public void onClick(BatModel item, int position) { Toast.makeText(this, item.getText(), Toast.LENGTH_SHORT).show(); } @Override public void onOutsideClicked() { mRecyclerView.revertAnimation(); } } 属性更改为Layer

'top'