Can I Customize the Axis Appearance in Matlab2tikz?

  • Context: MATLAB 
  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Axis
Click For Summary
SUMMARY

The discussion centers on customizing axis appearance in matlab2tikz, a tool for converting MATLAB figures to TikZ/PGF format. Users noted that the default output often results in square axes, which may not be visually appealing. Suggestions included limiting the axis range in MATLAB before exporting or overlaying additional drawings in TikZ to achieve a desired aesthetic. The conversation highlights the importance of manual adjustments for achieving optimal figure presentation.

PREREQUISITES
  • Familiarity with MATLAB plotting functions
  • Understanding of matlab2tikz version compatibility
  • Basic knowledge of TikZ syntax and commands
  • Experience with axis manipulation in MATLAB
NEXT STEPS
  • Explore MATLAB axis properties for customization
  • Learn how to limit axis ranges in MATLAB plots
  • Research TikZ overlay techniques for enhancing figures
  • Investigate advanced features of matlab2tikz for figure export
USEFUL FOR

Mathematics educators, researchers, and anyone involved in creating high-quality visualizations using MATLAB and TikZ will benefit from this discussion.

member 428835
Hi PF!

I am running matlab2tikz and it is working great. However, is there a way to control what the axis look like? Right now my axis have an entire square. Anyone know a way to edit this in the tikZ file?

I've attached two figures, the non-square one is what I would like my axis to look like and the square one is what matlab2tikz automatically generates.

Thanks so much!

Josh
 

Attachments

  • Screen Shot 2016-05-20 at 11.38.43 AM.png
    Screen Shot 2016-05-20 at 11.38.43 AM.png
    50.7 KB · Views: 645
  • Screen Shot 2016-05-20 at 11.38.52 AM.png
    Screen Shot 2016-05-20 at 11.38.52 AM.png
    26.9 KB · Views: 619
Physics news on Phys.org
They both look square to me.

EDIT never mind I see that the first is non-square and prettier

Can you control it by limiting the axis range?
 
jedishrfu said:
They both look square to me.

EDIT never mind I see that the first is non-square and prettier

Can you control it by limiting the axis range?

I think the best thing to do is plot the function in MATLAB and then run matlab2tikz and draw on top of the image in tikZ.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
1
Views
4K
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 0 ·
Replies
0
Views
6K
  • · Replies 4 ·
Replies
4
Views
1K