Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9016281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:57:22+00:00 2026-06-16T03:57:22+00:00

I want to include my figure in LaTeX document but have following problems. Printing

  • 0

I want to include my figure in LaTeX document but have following problems.

  1. Printing figure as EPS is not working. Figure is wrongly cropped. Please see figure below.

  2. How to print multiple figures in a loop using handle?

My data:

str=[...
    '15.12.2012 11:27'
    '15.12.2012 11:12'
    '15.12.2012 10:57'
    '15.12.2012 10:42'
    '14.12.2012 10:27'
    '14.12.2012 10:12'
    '14.12.2012 09:57'
    '14.12.2012 09:42'
    '14.12.2012 09:27'
    '14.12.2012 09:12'
    '14.12.2012 08:57'
    '13.12.2012 08:42'
    '13.12.2012 08:27'
    '13.12.2012 08:12'
    '13.12.2012 07:57'
    '13.12.2012 07:42'
    '13.12.2012 07:27'
    '12.12.2012 07:12'
    '12.12.2012 06:57'
    '12.12.2012 06:42'
    '12.12.2012 06:27'
    '12.12.2012 06:12'
    '11.12.2012 05:57'
    '11.12.2012 05:42'
    '10.12.2012 05:27'
    '10.12.2012 05:12'
    '10.12.2012 04:57'];

Col1=[...
0.9884753
1.670642
1.14455
1.0301446
0.99031037
1.0459388
0.97192177
0.8925
0.8985693
0.955
0.95103529
0.95203444
0.955
0.95970876
0.95929422
0.95578656
0.955
0.955
0.95342687
0.955
0.955
0.95930485
0.95530825
0.96452381
0.9675
0.98778061
1.3];
Col2=rand(27,1).*(Col1);
Col3=Col1+Col2;
% find first occurrence of dates
[y,m,d,h,mn] = datevec(str,'dd.mm.yyyy HH:MM');

dn = datenum(y,m,d);
[~,ind] = unique(dn,'first');
ind = sort(ind);
% plot it nicely
plot(Col1);
hold all
plot(Col2);
hold all
plot(Col3);
leg_h=legend('bus','Car', 'truck','Location','NorthEastOutside');
set(leg_h,'Interpreter','latex','fontsize',14)
xlabel('time $t$','Interpreter','latex','fontsize',12);
ylabel('speed $m$','Interpreter','latex','fontsize',12);
ax = gca;
dstr = cellstr(datestr(dn,'dd.mm.yyyy'));
set(ax, 'XTick',ind, 'XTickLabel',dstr(ind), 'Position',[0.1,0.15,0.8,0.75]);
ylim([-20 20]); 


% plot something...
print -deps epsFig

The LaTeX code:

\begin{figure}
\centering
\includegraphics[width=0.9\textwidth, angle=0]{epsFig.eps}
\caption{Insert caption}
\end{figure}

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:57:23+00:00Added an answer on June 16, 2026 at 3:57 am
    1. Try datetick. With ‘keepticks’, I find it works significantly better for date-time plots. Regardless, this is Matlab side, not Latex side.
    2. I’ve started using export_fig with great success.
    3. Create a figure with (not sure why the code section isn’t working)

      handle=figure;

      .. generate plot ..

      export_fig(handle, …. )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have helper class which contain different methods. I dо not want to include
I have done my research but can not figure out how to do this.
I want to include validates_confirmation_of :password in a module but i keep getting errors
i'm very aware that this is probably not a stackoverflow question, but i figure
i'm working on a website. I have a file in php and I want
So, I have log4net configuration in log4net.config file and I don't want to include
Apologies if the title is ambiguous, but I could not figure out a good
I have a directory of arbitrary files I want to include in my jar
I'm working with a structure of tables; i have several small tables i want
I want include the Type name of each object in my collection from my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.