Redian新闻
>
怎样把matlab里的彩色图输入到latex 里去?
avatar
怎样把matlab里的彩色图输入到latex 里去?# TeX - TeX电子排版系统
t*h
1
我在matlab 里转换成eps文件,打开后图却被砍了一半
我想用 gsview,但打开后全是黑白的。
不知道要怎样才能输入彩色的图。谢谢了。
avatar
S*I
2
MatLab图片另存为eps格式,应该没问题

【在 t**********h 的大作中提到】
: 我在matlab 里转换成eps文件,打开后图却被砍了一半
: 我想用 gsview,但打开后全是黑白的。
: 不知道要怎样才能输入彩色的图。谢谢了。

avatar
t*h
3
我发现我把图放大后(全屏)"save as" 存成“eps”文件,但是图被砍了一半,也可
能是我的图太大了。如果我没有用全屏存,那么save as 后的eps文件就和matlab里打
出的图片是一样的。
谢谢你!
avatar
k*f
4
Try this in matlab:
print -deps2c figure
or use the function style:
print('-deps2c', 'figure'); % this support variable as esp file name.
check print's document for details.
avatar
t*h
5
谢谢你的提议,it works. Matlab 直接生成eps彩色的图,但是latex却读不进去,老
是有问题。请问你是怎样读到Latex里的?
谢谢。
avatar
k*f
6
Here's what I use:
\usepackage{graphicx}
%
% other stuff
%
\begin{figure}
\centering
\includegraphics{myfigure}
\caption{Caption of the figure}
\label{fig:myfigure}
\end{figure}
This should work for latex with DVI or DVI->PS output. If you run pdflatex
directly, you need to convert the eps figure to pdf file using epstopdf.
If you still have questions, please post your code here.
Good luck.
avatar
t*h
7
hi, 再次谢谢你了,我弄出来了,真是frustrating. In matlab, I use:
"print -depsc -tiff picture"
In Latex, I used:
\usepackage{graphicx,epsfig}
\begin{figure}
\begin{center}
\psfig{figure=picture.eps,height=10cm,width=16cm}
\caption{{...}
\end{center}
\end{figure}
看来你是老手了,哈哈!

【在 k**f 的大作中提到】
: Here's what I use:
: \usepackage{graphicx}
: %
: % other stuff
: %
: \begin{figure}
: \centering
: \includegraphics{myfigure}
: \caption{Caption of the figure}
: \label{fig:myfigure}

avatar
k*f
8
我用MATLAB和LaTeX是有些年头了。我建议你下载这个文档,有空读读。我当年就是跟
着它学的,应该说这些年来相当顺利。
ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.pdf
几年没盯着,现在这个版本居然已经长到了124页!不过里面确实是好料。
另外你是在MALTLAB生成的EPS文件里加上了tiff预览。不知你用的是什么平台。以前在
Windows中加此预览似乎有意义,因为EPS文件导入到Office中只能显示tiff预览,否则
就只能显示一个框框。但至少从Office 2003开始,即使没有tiff预览,导入的EPS文件
也会自动生成一个低分辨率的预览。当用Postscript打印机打印时,还是会打印高分辨
率的图形。所以我不觉得还有必要加tiff预览。如果你用的是其他平台(Mac, Unix),
事情就另当别论了。
周末愉快。
avatar
t*h
9
Hi, Thank you again.
I tried to download the pdf file you send to me but failed. it seems that
there is no such file. is there any other access? Thanks.
另外,谢谢你提醒我 "tiff",我再在matlab 里面试试。 我对电脑不熟悉,只知道我的
电脑是Windows, 不是其它系统。
Have a nice weekend to you too!

【在 k**f 的大作中提到】
: 我用MATLAB和LaTeX是有些年头了。我建议你下载这个文档,有空读读。我当年就是跟
: 着它学的,应该说这些年来相当顺利。
: ftp://ftp.tex.ac.uk/tex-archive/info/epslatex.pdf
: 几年没盯着,现在这个版本居然已经长到了124页!不过里面确实是好料。
: 另外你是在MALTLAB生成的EPS文件里加上了tiff预览。不知你用的是什么平台。以前在
: Windows中加此预览似乎有意义,因为EPS文件导入到Office中只能显示tiff预览,否则
: 就只能显示一个框框。但至少从Office 2003开始,即使没有tiff预览,导入的EPS文件
: 也会自动生成一个低分辨率的预览。当用Postscript打印机打印时,还是会打印高分辨
: 率的图形。所以我不觉得还有必要加tiff预览。如果你用的是其他平台(Mac, Unix),
: 事情就另当别论了。

avatar
l*x
10
用Matlab的图表窗口菜单里的Export导出为eps,然后加入LaTeX中。如果图像太大被裁
用scale参数缩小就行了。

【在 t**********h 的大作中提到】
: 我在matlab 里转换成eps文件,打开后图却被砍了一半
: 我想用 gsview,但打开后全是黑白的。
: 不知道要怎样才能输入彩色的图。谢谢了。

avatar
k*f
11

Just tried the ftp link with Firefox and IE, both are able to download the
file. You may want to try this http link:
http://www.ctan.org/get/info/epslatex/english/
where you can download either the PS version or the PDF version.
Good luck.

【在 t**********h 的大作中提到】
: Hi, Thank you again.
: I tried to download the pdf file you send to me but failed. it seems that
: there is no such file. is there any other access? Thanks.
: 另外,谢谢你提醒我 "tiff",我再在matlab 里面试试。 我对电脑不熟悉,只知道我的
: 电脑是Windows, 不是其它系统。
: Have a nice weekend to you too!

avatar
t*h
12
谢谢你,我下载下来了。
have a good weekend.

【在 k**f 的大作中提到】
:
: Just tried the ftp link with Firefox and IE, both are able to download the
: file. You may want to try this http link:
: http://www.ctan.org/get/info/epslatex/english/
: where you can download either the PS version or the PDF version.
: Good luck.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。