Prev: traslation
Next: problem of index with system of ode
From: Kaisen deng on 26 Jul 2010 09:24 dpb <none(a)non.net> wrote in message <i2k1s5$fk2$1(a)news.eternal-september.org>... > us wrote: > > "Kaisen deng" <csudeng(a)126.com> wrote in message > > <i2ih2j$24k$1(a)fred.mathworks.com>... > >> dpb <none(a)non.net> wrote in message > >> <i2ibeu$b7b$1(a)news.eternal-september.org>... > >> > Kaisen deng wrote: > >> > > please tell me how to create the axes in this figure: > >> > > http://home.simwe.com/attachment/201007/25/134279_1280092096Fwh7.jpg > >> > > Create/write the tick labels manually via > >> > > set(gca,'xticklabel', yourdesiredlabelcharacterarray); > >> > > >> Thanks so much. > >> > >> The problem is i don't know how to write the "times' symbol and 10 to > >> the power of -4 manually in yourdesiredlabelcharacterarray. > > > > a hint: > > > > help sprintf; > > help cellstr; > > us, I just (probably re-)discovered that my initial thought re: Tex > interpretation of the axis text would automagically do what OP wants > doesn't appear possible in my earlier version (R12). Has Tex > interpretation been extended to axis labels in current versions? If > not, seems as though it would have to be done via text() function instead... > I tried sprintf but I still don't know how to write the "times' symbol and 10 to the power of -4 in axes label, please tell me how to do. thanks so much
From: us on 26 Jul 2010 09:29 dpb <none(a)non.net> wrote in message <i2k1s5$fk2$1(a)news.eternal-september.org>... > us wrote: > > "Kaisen deng" <csudeng(a)126.com> wrote in message > > <i2ih2j$24k$1(a)fred.mathworks.com>... > >> dpb <none(a)non.net> wrote in message > >> <i2ibeu$b7b$1(a)news.eternal-september.org>... > >> > Kaisen deng wrote: > >> > > please tell me how to create the axes in this figure: > >> > > http://home.simwe.com/attachment/201007/25/134279_1280092096Fwh7.jpg > >> > > Create/write the tick labels manually via > >> > > set(gca,'xticklabel', yourdesiredlabelcharacterarray); > >> > > >> Thanks so much. > >> > >> The problem is i don't know how to write the "times' symbol and 10 to > >> the power of -4 manually in yourdesiredlabelcharacterarray. > > > > a hint: > > > > help sprintf; > > help cellstr; > > us, I just (probably re-)discovered that my initial thought re: Tex > interpretation of the axis text would automagically do what OP wants > doesn't appear possible in my earlier version (R12). Has Tex > interpretation been extended to axis labels in current versions? If > not, seems as though it would have to be done via text() function instead... unfortunately, still not available as of r2010a... the OP would have to resort to a more rough version using standard chars, eg, s={'0.9','1.0x10-1'}; us
From: dpb on 26 Jul 2010 10:07 Kaisen deng wrote: > dpb <none(a)non.net> wrote in message > <i2k1s5$fk2$1(a)news.eternal-september.org>... >> us wrote: >> > "Kaisen deng" <csudeng(a)126.com> wrote in message > >> <i2ih2j$24k$1(a)fred.mathworks.com>... >> >> dpb <none(a)non.net> wrote in message >> >> <i2ibeu$b7b$1(a)news.eternal-september.org>... >> >> > Kaisen deng wrote: >> >> > > please tell me how to create the axes in this figure: >> >> > > >> http://home.simwe.com/attachment/201007/25/134279_1280092096Fwh7.jpg >> >> > > Create/write the tick labels manually via >> >> > > set(gca,'xticklabel', yourdesiredlabelcharacterarray); >> >> > >> >> Thanks so much. >> >> >> >> The problem is i don't know how to write the "times' symbol and 10 >> to >> the power of -4 manually in yourdesiredlabelcharacterarray. >> > > a hint: >> > > help sprintf; >> > help cellstr; >> >> us, I just (probably re-)discovered that my initial thought re: Tex >> interpretation of the axis text would automagically do what OP wants >> doesn't appear possible in my earlier version (R12). Has Tex >> interpretation been extended to axis labels in current versions? If >> not, seems as though it would have to be done via text() function >> instead... >> > I tried sprintf but I still don't know how to write the "times' symbol > and 10 to the power of -4 in axes label, please tell me how to do. > thanks so much Well, turns out what I was originally thinking doesn't work as the Tex interpreter doesn't work for the axis tick label text (an us just confirmed it is still so, not just my early version). So, to do what you want would require using the text() function and writing onto the plot in that fashion. Example... >> plot(0:4) >> set(gca,'xticklabel','') >> text(5,0,'1x10^-4','horizontal','center','vertical','top') writes the 10-4 on the right axis tick location. You'll want doc text and sections on annotation of plots that gives hints on how to salt to suit... --
From: dpb on 26 Jul 2010 14:01 dpb wrote: .... > >> text(5,0,'1x10^-4','horizontal','center','vertical','top') > > writes the 10-4 on the right axis tick location. .... OBTW, note I forgot and omitted the curly brackets to surround the '-4' to apply superscript to both. text(5,0,'1x10^{-4}','horizontal','center','vertical','top') will look better. --
From: Kaisen deng on 26 Jul 2010 16:42
dpb <none(a)non.net> wrote in message <i2kinn$98s$1(a)news.eternal-september.org>... > dpb wrote: > ... > > > >> text(5,0,'1x10^-4','horizontal','center','vertical','top') > > > > writes the 10-4 on the right axis tick location. .... > > OBTW, note I forgot and omitted the curly brackets to surround the '-4' > to apply superscript to both. > > text(5,0,'1x10^{-4}','horizontal','center','vertical','top') > > will look better. > Thanks! I know char(215) will show the 'times' symbol, but I don't know how to add in '1x10^{-4}' to replace x. |