|
103 | 103 | "fig, (ax1, ax2) = plt.subplots(1, 2, sharex=True, figsize=(18, 6))\n", |
104 | 104 | "\n", |
105 | 105 | "# Panel 1\n", |
106 | | - "ax1.plot(df.time, df.wind_speed, color='tab:orange', label='Windspeed')\n", |
| 106 | + "ax1.plot(df.time.values, df.wind_speed, color='tab:orange', label='Windspeed')\n", |
107 | 107 | "ax1.set_xlabel('Time')\n", |
108 | 108 | "ax1.set_ylabel('Speed')\n", |
109 | 109 | "ax1.set_title('Measured Winds')\n", |
|
115 | 115 | "ax1.xaxis.set_major_locator(DayLocator())\n", |
116 | 116 | "\n", |
117 | 117 | "# Panel 2\n", |
118 | | - "ax2.plot(df.time, df.pressure, color='black', label='Pressure')\n", |
| 118 | + "ax2.plot(df.time.values, df.pressure, color='black', label='Pressure')\n", |
119 | 119 | "ax2.set_xlabel('Time')\n", |
120 | 120 | "ax2.set_ylabel('hPa')\n", |
121 | 121 | "ax2.set_title('Atmospheric Pressure')\n", |
|
587 | 587 | "# Loop over the list of subplots and names together\n", |
588 | 588 | "for ax, var_name in zip(axes, plot_variables):\n", |
589 | 589 | " \n", |
590 | | - " ax.plot(df.time, df[var_name])\n", |
| 590 | + " ax.plot(df.time.values, df[var_name])\n", |
591 | 591 | "\n", |
592 | 592 | " # Set label/title based on variable name--no longer hard-coded\n", |
593 | 593 | " ax.set_ylabel(var_name)\n", |
|
653 | 653 | "\n", |
654 | 654 | " # Grab the color from our dictionary and pass it to plot()\n", |
655 | 655 | " color = colors[var_name]\n", |
656 | | - " ax.plot(df.time, df[var_name], color)\n", |
| 656 | + " ax.plot(df.time.values, df[var_name], color)\n", |
657 | 657 | "\n", |
658 | 658 | " ax.set_ylabel(var_name)\n", |
659 | 659 | " ax.set_title(f'Buoy {var_name}')\n", |
|
686 | 686 | " for var_name in var_names:\n", |
687 | 687 | " # Grab the color from our dictionary and pass it to plot()\n", |
688 | 688 | " color = colors[var_name]\n", |
689 | | - " ax.plot(df.time, df[var_name], color)\n", |
| 689 | + " ax.plot(df.time.values, df[var_name], color)\n", |
690 | 690 | "\n", |
691 | 691 | " ax.set_ylabel(var_name)\n", |
692 | 692 | " ax.set_title(f'Buoy {var_name}')\n", |
|
725 | 725 | " for var_name in var_names:\n", |
726 | 726 | " # Grab the color from our dictionary and pass it to plot()\n", |
727 | 727 | " color = colors[var_name]\n", |
728 | | - " ax.plot(df.time, df[var_name], color)\n", |
| 728 | + " ax.plot(df.time.values, df[var_name], color)\n", |
729 | 729 | "\n", |
730 | 730 | " ax.set_ylabel(var_name)\n", |
731 | 731 | " ax.set_title(f'Buoy {var_name}')\n", |
|
791 | 791 | " \n", |
792 | 792 | " color = colors[var_name]\n", |
793 | 793 | " linestyle = linestyles[var_name]\n", |
794 | | - " ax.plot(df.time, df[var_name], color, linestyle=linestyle, label=label)\n", |
| 794 | + " ax.plot(df.time.values, df[var_name], color, linestyle=linestyle, label=label)\n", |
795 | 795 | "\n", |
796 | 796 | " ax.set_ylabel(title)\n", |
797 | 797 | " ax.set_title(f'Buoy {title}')\n", |
|
840 | 840 | " title, label = format_varname(var_name)\n", |
841 | 841 | " color = colors[var_name]\n", |
842 | 842 | " linestyle = linestyles[var_name]\n", |
843 | | - " ax.plot(df.time, df[var_name], color, linestyle=linestyle, label=label)\n", |
| 843 | + " ax.plot(df.time.values, df[var_name], color, linestyle=linestyle, label=label)\n", |
844 | 844 | "\n", |
845 | 845 | " ax.set_ylabel(title)\n", |
846 | 846 | " ax.set_title(f'Buoy {buoy} {title}')\n", |
|
0 commit comments