help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Plotting whole numbers only.


From: gholladay
Subject: Plotting whole numbers only.
Date: Wed, 15 May 2013 11:50:51 -0700 (PDT)

I'm attempting to plot double-precision numbers and only whole numbers are
being plotted.  The plotting portion of the script is:

% Plot heading data, including deltas
hold on
close all
% position = get (0, "defaultfigureposition");
% figure ("position", [0.5, 0.5, 1.9, 1.1] .* position);
% figure (1, "position", position);
% figure (1);
figure("visible","off");
subplot (2, 1, 1);
graphics_toolkit gnuplot
plot(IRS_Time_ms(2:end),AHRS_Scaled_Heading,"@3*",'markersize',1);
hold on
% subplot (2, 1, 1);
% graphics_toolkit gnuplot
plot(IRS_Time_ms(2:end),IRS_Heading(2:end),"@1*",'markersize',1);
Heading_Plot_Title = cstrcat(Test_Folder_Name, ", Heading - ",Test_Date);
title (Heading_Plot_Title, "fontsize", 10);
IRS_Time_sz = size(IRS_Time,1);
% Sets the labels on the X-axis to the time string. Note we start from 2
because this first row is the header file information
set(gca,'XTick',IRS_Time_ms(2:round(IRS_Time_sz/7):IRS_Time_sz),'XTickLabel',IRS_Time(2:round(IRS_Time_sz/7):IRS_Time_sz));
% set (gca (), "ylim", [330, 340]);
set (gca (), 'fontsize', 8);
xlabel("Time", 'fontsize', 8);
ylabel("Heading (deg)", "fontsize", 8);
legend ("AHRS","IRS");
% legend ('fontsize', 8);
grid;

% Plot Scaled AHRS Heading_Delta
subplot (2, 1, 2);
% graphics_toolkit gnuplot
plot(IRS_Time_ms(2:end),Heading_Delta,"@3*",'markersize',1);
Heading_Delta_Plot_Title = cstrcat(Test_Folder_Name, ", Heading Delta (Max:
", num2str(MaxHeading_Delta), ") - ",Test_Date);
title (Heading_Delta_Plot_Title, "fontsize", 10);

IRS_Time_sz = size(IRS_Time,1);
% Set the labels on the X-axis to the time string. Note we start from 2
because this first row is the header file information
set(gca,'XTick',IRS_Time_ms(2:round(IRS_Time_sz/7):IRS_Time_sz),'XTickLabel',IRS_Time(2:round(IRS_Time_sz/7):IRS_Time_sz));
% set (gca (), "ylim", [-4, 8]);
set (gca (), 'fontsize', 8);
xlabel("Time", 'fontsize', 8);
ylabel("Heading Delta (deg)", "fontsize", 8);
legend ("Heading Delta");
grid;

% Save plot to picture file
saveas(1, 'Plot_Test.jpeg');

Can you tell me what is causing this problem and how to fix it?

Greg



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Plotting-whole-numbers-only-tp4652991.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]