Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
21 Nov 2009 Centered coordinate axes in 2D plots Takes the current coordinate axes (with ticks and labels) and draws new ones centered at the origin. Author: Johan Carlson Carlson, Johan

Mario,
I deliberately removed the end tick labels in on the axes, simply because I didn't think it looked so good. It appeared that changing this takes a bit of fixing of the code to make the arrowheads appear in the right place. Anyway, I'm on it, and I'll post a new version in a couple of days.

/JC

20 Nov 2009 Centered coordinate axes in 2D plots Takes the current coordinate axes (with ticks and labels) and draws new ones centered at the origin. Author: Johan Carlson Liverpool, Mario

Thank u Johan, I downloaded "centeraxes", it solved my problem.
How do I get the axes ticked from -1 to 1 please? now it's ticked only from -0.9 to 0.9.
Thanks again
Mario

05 Jun 2009 Edit linestyles of plot legends Simple fix for adding markers to plot legend lines. Author: Johan Carlson Mylavarapu, Goutham

Thanks. I had this problem and your code worked for me. Another code 'hack legend' also works the same way

12 May 2009 Edit linestyles of plot legends Simple fix for adding markers to plot legend lines. Author: Johan Carlson Carlson, Johan

I now posted an updated version, incorporating the changes suggested by Martin. It should be available for download any day now.
/JC

11 May 2009 Edit linestyles of plot legends Simple fix for adding markers to plot legend lines. Author: Johan Carlson Carlson, Johan

Good suggestion. will do!
/Johan

09 May 2009 Edit linestyles of plot legends Simple fix for adding markers to plot legend lines. Author: Johan Carlson Huber, Martin

very good! please also add color change:

%define colors
colors={'k',[0 0 1]};

%in your function:
%...
if ischar(colors{m})==1
        set(lines(k),'color',char(colors{m}));
else
        set(lines(k),'color',colors{m});
end
%...

02 Mar 2009 Edit linestyles of plot legends Simple fix for adding markers to plot legend lines. Author: Johan Carlson Teodovich, Lorgio

excellent, thank.

14 Jan 2009 Centered coordinate axes in 2D plots Takes the current coordinate axes (with ticks and labels) and draws new ones centered at the origin. Author: Johan Carlson Carlson, Johan

Thank you John!

The option of where to put the center is a simple fix, and I'll definitely deal with that. The other issue is more serious, and unfortunately slightly harder to solve. Nevertheless, I'll give it a go.

Another limitation at the moment is that the tick marks and arrowheads tend to scale if the image is resized after the call to centeraxes.

Anyway, thanks for the feedback.

/Johan

13 Jan 2009 Centered coordinate axes in 2D plots Takes the current coordinate axes (with ticks and labels) and draws new ones centered at the origin. Author: Johan Carlson Hughes, John

Pretty decent. Doesn't work in cases where you have multiple axes, as you sometimes get with

plot(foo)
hold on
plot(bar)
plot(baz)
hold off

But otherwise, it works pretty darned well. One suggested improvement: allow an option for what "center" to use, so that I could have x- and y-axes intersecting at (-1, 2), if I so chose.

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com