LineWidth control in x and y (width and height)
Mostra commenti meno recenti
I would like to fix line thickness to just be applied in the y direction as not to obscure the true x value of the data I am presenting. Below is simplified code that illustrates the issue.
x = [-10 0];
y = [0 0];
plot(x, y,'Color', 'b','LineWidth',100)
set(gca,'layer','top')
hold on
plot([0,5], [0 0],'Color', 'r' ,'LineWidth',20)
It looks like with these high values of LineWidth the true x values are padded where I would like it to stop immediately at the given values. I am using version 2014b.
7 Commenti
Walter Roberson
il 5 Nov 2016
I do not observe any x padding? Which MATLAB are you using and which operating system? Please attach an image of what you observe.

Walter Roberson
il 5 Nov 2016
Odd.
What does
opengl info
return for whether it is using hardware or software rendering? Are you using a vendor graphics driver or are you using Mesa?
I do not have Linux running directly on hardware here; I have virtual machines that I fire up at need for testing. Unfortunately those virtual machines cannot access the graphics hardware directly and getting the layers right is.. tricky. The best I have been able to do so far is Unbuntu 14.04 with software openGL 1.2, a combination which does not show the problem with MATLAB R2016b. I went looking for RH6 but it appears to be a commercial product. I will try a couple of other combinations.
Walter Roberson
il 5 Nov 2016
Unfortunately Debian 8 and Centos 7 do not get me anywhere in testing; MATLAB crashes due to a missing symbol (it appears it takes a lot of effort to define the symbol; I worked on it for an hour or more the other day and just ended up having to load in more and more and deal with incompatible distribution mechanisms... bleh.)
I will try putting R2014b on my Ubuntu 14.04 VM.
Walter Roberson
il 5 Nov 2016
Modificato: Walter Roberson
il 5 Nov 2016
I confirm the behavior on R2014b on Ubuntu 14.04 with software opengl.
I have submitted a bug report about this, referencing your Question. Although it appears to have been fixed in later releases, there is no public bug report about it, so I do not know if there is any known work-around.
C K
il 5 Nov 2016
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Graphics Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
