3

I've installed the last version of MATLAB R2014b, I have a problem with the stem function not showing the line to the Data points , for example:

stem(1:12);

looks like this

I've try to adjust the Linestyle as shown in documentation .

figure
X = linspace(0,2*pi,25)';
Y = (cos(2*X));
stem(X,Y,'LineStyle','-.',...
     'MarkerFaceColor','red',...
     'MarkerEdgeColor','green') 

but it didn't help, any idea what's the problem here ?

UPDATE after running

h= stem(1:12)
get(h) 

here is the output :

  Annotation: [1x1 matlab.graphics.eventdata.Annotation]
          BaseLine: [1x1 Baseline]
         BaseValue: 0
      BeingDeleted: 'off'
        BusyAction: 'queue'
     ButtonDownFcn: ''
          Children: []
          Clipping: 'on'
             Color: [0 0.4470 0.7410]
         CreateFcn: ''
         DeleteFcn: ''
       DisplayName: ''
  HandleVisibility: 'on'
           HitTest: 'on'
     Interruptible: 'on'
         LineStyle: '-'
         LineWidth: 0.5000
            Marker: 'o'
   MarkerEdgeColor: 'auto'
   MarkerFaceColor: 'none'
        MarkerSize: 6
            Parent: [1x1 Axes]
     PickableParts: 'visible'
          Selected: 'off'
SelectionHighlight: 'on'
      ShowBaseLine: 'on'
               Tag: ''
              Type: 'stem'
     UIContextMenu: []
          UserData: []
           Visible: 'on'
             XData: [1 2 3 4 5 6 7 8 9 10 11 12]
         XDataMode: 'auto'
       XDataSource: ''
             YData: [1 2 3 4 5 6 7 8 9 10 11 12]
       YDataSource: ''
             ZData: [1x0 double]
       ZDataSource: ''
Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
Engine
  • 5,360
  • 18
  • 84
  • 162
  • Bizarre. Can you do `h = stem(1:12)` and then check `get(h)`? Do other line plots work? – nkjt Feb 06 '15 at 11:10
  • I'm reinstalling R2014b , I'll write update the answer when the installation is done ! – Engine Feb 06 '15 at 11:15
  • @nkjt here please check the update of my question – Engine Feb 06 '15 at 12:02
  • @Engine My Matlab 2014b does the lines with just `stem(x)` – Ander Biguri Feb 06 '15 at 12:45
  • @Ander sorry I don't get what you mean , I wrote an example of stem(1:12) and the result still the same, even after reinstalling MATLAB R2014b – Engine Feb 06 '15 at 12:56
  • @Engine I mean that it works for me in Matlab2014b if i do `stem(1:12)`, so the problem has to be in your machine, not in Matlab itself. – Ander Biguri Feb 06 '15 at 13:30
  • I'm using win7 64bit – Engine Feb 06 '15 at 13:32
  • I don't get what's the problem :/ – Engine Feb 06 '15 at 13:42
  • 1
    @Engine Neither do I. It just looks like you are the only one (or not, who knows) that has that problem. It is not a functionality/bug of Matlab 2014b, as it works perfectly in my machine. Hope you can fix it. – Ander Biguri Feb 06 '15 at 13:50
  • @Engine Did you solve this issue? It's working perfectly here with MATLAB R2014b and Windows 7 64bit. What is the output of `which stem`? – lmillefiori May 07 '15 at 18:04
  • I got the new version of MATLAB it works fine I think it'S a bug or smt similar – Engine May 07 '15 at 21:08
  • On 2015A I do get the stem with exactly the same properties as your stem. You don't accidentally call a figure command after stem or something? – Hugo Oct 15 '15 at 14:33

0 Answers0